Skip to content

Commit 4720e84

Browse files
fix: resolve CI failures and fix indentation in groups REST API
1 parent d9fc7e1 commit 4720e84

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

apps/meteor/app/api/server/v1/users.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)