@@ -450,12 +450,12 @@ const getObjectChanges = (remote, local, index, what) => {
450
450
return changes ;
451
451
}
452
452
453
- const createAttribute = async ( databaseId , collectionId , attribute ) => {
453
+ const createAttribute = ( databaseId , collectionId , attribute ) => {
454
454
switch ( attribute . type ) {
455
455
case 'string' :
456
456
switch ( attribute . format ) {
457
457
case 'email' :
458
- return await databasesCreateEmailAttribute ( {
458
+ return databasesCreateEmailAttribute ( {
459
459
databaseId,
460
460
collectionId,
461
461
key : attribute . key ,
@@ -465,7 +465,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
465
465
parseOutput : false
466
466
} )
467
467
case 'url' :
468
- return await databasesCreateUrlAttribute ( {
468
+ return databasesCreateUrlAttribute ( {
469
469
databaseId,
470
470
collectionId,
471
471
key : attribute . key ,
@@ -475,7 +475,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
475
475
parseOutput : false
476
476
} )
477
477
case 'ip' :
478
- return await databasesCreateIpAttribute ( {
478
+ return databasesCreateIpAttribute ( {
479
479
databaseId,
480
480
collectionId,
481
481
key : attribute . key ,
@@ -485,7 +485,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
485
485
parseOutput : false
486
486
} )
487
487
case 'enum' :
488
- return await databasesCreateEnumAttribute ( {
488
+ return databasesCreateEnumAttribute ( {
489
489
databaseId,
490
490
collectionId,
491
491
key : attribute . key ,
@@ -496,7 +496,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
496
496
parseOutput : false
497
497
} )
498
498
default :
499
- return await databasesCreateStringAttribute ( {
499
+ return databasesCreateStringAttribute ( {
500
500
databaseId,
501
501
collectionId,
502
502
key : attribute . key ,
@@ -509,7 +509,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
509
509
510
510
}
511
511
case 'integer' :
512
- return await databasesCreateIntegerAttribute ( {
512
+ return databasesCreateIntegerAttribute ( {
513
513
databaseId,
514
514
collectionId,
515
515
key : attribute . key ,
@@ -567,12 +567,12 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
567
567
}
568
568
}
569
569
570
- const updateAttribute = async ( databaseId , collectionId , attribute ) => {
570
+ const updateAttribute = ( databaseId , collectionId , attribute ) => {
571
571
switch ( attribute . type ) {
572
572
case 'string' :
573
573
switch ( attribute . format ) {
574
574
case 'email' :
575
- return await databasesUpdateEmailAttribute ( {
575
+ return databasesUpdateEmailAttribute ( {
576
576
databaseId,
577
577
collectionId,
578
578
key : attribute . key ,
@@ -582,7 +582,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => {
582
582
parseOutput : false
583
583
} )
584
584
case 'url' :
585
- return await databasesUpdateUrlAttribute ( {
585
+ return databasesUpdateUrlAttribute ( {
586
586
databaseId,
587
587
collectionId,
588
588
key : attribute . key ,
@@ -592,7 +592,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => {
592
592
parseOutput : false
593
593
} )
594
594
case 'ip' :
595
- return await databasesUpdateIpAttribute ( {
595
+ return databasesUpdateIpAttribute ( {
596
596
databaseId,
597
597
collectionId,
598
598
key : attribute . key ,
@@ -602,7 +602,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => {
602
602
parseOutput : false
603
603
} )
604
604
case 'enum' :
605
- return await databasesUpdateEnumAttribute ( {
605
+ return databasesUpdateEnumAttribute ( {
606
606
databaseId,
607
607
collectionId,
608
608
key : attribute . key ,
@@ -613,7 +613,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => {
613
613
parseOutput : false
614
614
} )
615
615
default :
616
- return await databasesUpdateStringAttribute ( {
616
+ return databasesUpdateStringAttribute ( {
617
617
databaseId,
618
618
collectionId,
619
619
key : attribute . key ,
@@ -626,7 +626,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => {
626
626
627
627
}
628
628
case 'integer' :
629
- return await databasesUpdateIntegerAttribute ( {
629
+ return databasesUpdateIntegerAttribute ( {
630
630
databaseId,
631
631
collectionId,
632
632
key : attribute . key ,
@@ -882,7 +882,7 @@ const createAttributes = async (attributes, collection) => {
882
882
const result = await awaitPools . expectAttributes (
883
883
collection [ 'databaseId' ] ,
884
884
collection [ '$id' ] ,
885
- collection . attributes . map ( attribute => attribute . key )
885
+ collection . attributes . filter ( attribute => attribute . side !== 'child' ) . map ( attribute => attribute . key )
886
886
) ;
887
887
888
888
if ( ! result ) {
0 commit comments