File tree Expand file tree Collapse file tree
apps/meteor/app/api/server/v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -380,7 +380,7 @@ API.v1.addRoute(
380380 throw new Meteor . Error ( 'error-not-allowed' , 'Not allowed' ) ;
381381 }
382382
383- const result = await deleteUserOwnAccount ( this . userId , password , confirmRelinquish ) ;
383+ await deleteUserOwnAccount ( this . userId , password , confirmRelinquish ) ;
384384
385385 return API . v1 . success ( ) ;
386386 } ,
@@ -548,7 +548,12 @@ API.v1.addRoute(
548548 ]
549549 : [ ] ;
550550
551- const result = await Users . col
551+ const [
552+ {
553+ sortedResults : users ,
554+ totalCount : [ { total } = { total : 0 } ] ,
555+ } = { sortedResults : [ ] , totalCount : [ ] } ,
556+ ] = await Users . col
552557 . aggregate < { sortedResults : IUser [ ] ; totalCount : { total : number } [ ] } > ( [
553558 {
554559 $match : nonEmptyQuery ,
@@ -580,11 +585,6 @@ API.v1.addRoute(
580585 ] )
581586 . toArray ( ) ;
582587
583- const {
584- sortedResults : users ,
585- totalCount : [ { total } = { total : 0 } ] ,
586- } = result [ 0 ] ;
587-
588588 return API . v1 . success ( {
589589 users,
590590 count : users . length ,
You can’t perform that action at this time.
0 commit comments