This commit is contained in:
Jori Lallo
2018-03-04 16:53:57 -08:00
parent 06a6573feb
commit a0f58583b5
12 changed files with 136 additions and 123 deletions

View File

@ -125,7 +125,7 @@ router.post('user.suspend', auth(), async ctx => {
const admin = ctx.state.user;
const userId = ctx.body.id;
const teamId = ctx.state.user.teamId;
ctx.assertPresent(userId, 'user is required');
ctx.assertPresent(userId, 'id is required');
const user = await User.findById(userId);
authorize(ctx.state.user, 'suspend', user);
@ -152,7 +152,7 @@ router.post('user.activate', auth(), async ctx => {
const admin = ctx.state.user;
const userId = ctx.body.id;
const teamId = ctx.state.user.teamId;
ctx.assertPresent(userId, 'user is required');
ctx.assertPresent(userId, 'id is required');
const user = await User.findById(userId);
authorize(ctx.state.user, 'activate', user);