@@ -167,7 +167,7 @@ class Browser extends DashboardView {
167
167
if ( isRelationRoute && ! relation ) {
168
168
const parentObjectQuery = new Parse . Query ( className ) ;
169
169
const { useMasterKey } = this . state ;
170
- const parent = await parentObjectQuery . get ( entityId , { useMasterKey : useMasterKey } ) ;
170
+ const parent = await parentObjectQuery . get ( entityId , { useMasterKey } ) ;
171
171
relation = parent . relation ( relationName ) ;
172
172
}
173
173
await this . setState ( {
@@ -383,7 +383,7 @@ class Browser extends DashboardView {
383
383
384
384
query . limit ( MAX_ROWS_FETCHED ) ;
385
385
386
- let promise = query . find ( { useMasterKey : useMasterKey } ) ;
386
+ let promise = query . find ( { useMasterKey } ) ;
387
387
let isUnique = false ;
388
388
let uniqueField = null ;
389
389
filters . forEach ( async ( filter ) => {
@@ -403,7 +403,7 @@ class Browser extends DashboardView {
403
403
async fetchParseDataCount ( source , filters ) {
404
404
const query = queryFromFilters ( source , filters ) ;
405
405
const { useMasterKey } = this . state ;
406
- const count = await query . count ( { useMasterKey : useMasterKey } ) ;
406
+ const count = await query . count ( { useMasterKey } ) ;
407
407
return count ;
408
408
}
409
409
@@ -481,7 +481,7 @@ class Browser extends DashboardView {
481
481
query . limit ( MAX_ROWS_FETCHED ) ;
482
482
483
483
const { useMasterKey } = this . state ;
484
- query . find ( { useMasterKey : useMasterKey } ) . then ( ( nextPage ) => {
484
+ query . find ( { useMasterKey } ) . then ( ( nextPage ) => {
485
485
if ( className === this . props . params . className ) {
486
486
this . setState ( ( state ) => ( {
487
487
data : state . data . concat ( nextPage )
@@ -573,7 +573,7 @@ class Browser extends DashboardView {
573
573
obj . set ( attr , value ) ;
574
574
}
575
575
const { useMasterKey } = this . state ;
576
- obj . save ( null , { useMasterKey : useMasterKey } ) . then ( ( objectSaved ) => {
576
+ obj . save ( null , { useMasterKey } ) . then ( ( objectSaved ) => {
577
577
const createdOrUpdated = isNewObject ? 'created' : 'updated' ;
578
578
let msg = objectSaved . className + ' with id \'' + objectSaved . id + '\' ' + createdOrUpdated ;
579
579
this . showNote ( msg , false ) ;
@@ -587,7 +587,7 @@ class Browser extends DashboardView {
587
587
const parentRelation = parent . relation ( relation . key ) ;
588
588
parentRelation . add ( obj ) ;
589
589
const targetClassName = relation . targetClassName ;
590
- parent . save ( null , { useMasterKey : useMasterKey } ) . then ( ( ) => {
590
+ parent . save ( null , { useMasterKey } ) . then ( ( ) => {
591
591
this . setState ( {
592
592
newObject : null ,
593
593
data : [
@@ -668,7 +668,7 @@ class Browser extends DashboardView {
668
668
let relation = this . state . relation ;
669
669
if ( relation && toDelete . length ) {
670
670
relation . remove ( toDelete ) ;
671
- relation . parent . save ( null , { useMasterKey : useMasterKey } ) . then ( ( ) => {
671
+ relation . parent . save ( null , { useMasterKey } ) . then ( ( ) => {
672
672
if ( this . state . relation === relation ) {
673
673
for ( let i = 0 ; i < indexes . length ; i ++ ) {
674
674
this . state . data . splice ( indexes [ i ] - i , 1 ) ;
@@ -679,7 +679,7 @@ class Browser extends DashboardView {
679
679
}
680
680
} ) ;
681
681
} else if ( toDelete . length ) {
682
- Parse . Object . destroyAll ( toDelete , { useMasterKey : useMasterKey } ) . then ( ( ) => {
682
+ Parse . Object . destroyAll ( toDelete , { useMasterKey } ) . then ( ( ) => {
683
683
let deletedNote ;
684
684
685
685
if ( toDeleteObjectIds . length == 1 ) {
@@ -777,7 +777,7 @@ class Browser extends DashboardView {
777
777
const query = new Parse . Query ( relation . targetClassName ) ;
778
778
const parent = relation . parent ;
779
779
query . containedIn ( 'objectId' , objectIds ) ;
780
- let objects = await query . find ( { useMasterKey : useMasterKey } ) ;
780
+ let objects = await query . find ( { useMasterKey } ) ;
781
781
const missedObjectsCount = objectIds . length - objects . length ;
782
782
if ( missedObjectsCount ) {
783
783
const missedObjects = [ ] ;
@@ -791,7 +791,7 @@ class Browser extends DashboardView {
791
791
throw `${ errorSummary } ${ JSON . stringify ( missedObjects ) } ` ;
792
792
}
793
793
parent . relation ( relation . key ) . add ( objects ) ;
794
- await parent . save ( null , { useMasterKey : useMasterKey } ) ;
794
+ await parent . save ( null , { useMasterKey } ) ;
795
795
// remove duplication
796
796
this . state . data . forEach ( origin => objects = objects . filter ( object => object . id !== origin . id ) ) ;
797
797
this . setState ( {
@@ -819,12 +819,12 @@ class Browser extends DashboardView {
819
819
async confirmAttachSelectedRows ( className , targetObjectId , relationName , objectIds , targetClassName ) {
820
820
const { useMasterKey } = this . state ;
821
821
const parentQuery = new Parse . Query ( className ) ;
822
- const parent = await parentQuery . get ( targetObjectId , { useMasterKey : useMasterKey } ) ;
822
+ const parent = await parentQuery . get ( targetObjectId , { useMasterKey } ) ;
823
823
const query = new Parse . Query ( targetClassName || this . props . params . className ) ;
824
824
query . containedIn ( 'objectId' , objectIds ) ;
825
- const objects = await query . find ( { useMasterKey : useMasterKey } ) ;
825
+ const objects = await query . find ( { useMasterKey } ) ;
826
826
parent . relation ( relationName ) . add ( objects ) ;
827
- await parent . save ( null , { useMasterKey : useMasterKey } ) ;
827
+ await parent . save ( null , { useMasterKey } ) ;
828
828
this . setState ( {
829
829
selection : { } ,
830
830
} ) ;
@@ -850,12 +850,12 @@ class Browser extends DashboardView {
850
850
}
851
851
const query = new Parse . Query ( this . props . params . className ) ;
852
852
query . containedIn ( 'objectId' , objectIds ) ;
853
- const objects = await query . find ( { useMasterKey : useMasterKey } ) ;
853
+ const objects = await query . find ( { useMasterKey } ) ;
854
854
const toClone = [ ] ;
855
855
for ( const object of objects ) {
856
856
toClone . push ( object . clone ( ) ) ;
857
857
}
858
- await Parse . Object . saveAll ( toClone , { useMasterKey : useMasterKey } ) ;
858
+ await Parse . Object . saveAll ( toClone , { useMasterKey } ) ;
859
859
this . setState ( {
860
860
selection : { } ,
861
861
data : [
0 commit comments