diff options
Diffstat (limited to 'src/server/api/endpoints/admin/unsuspend-user.ts')
| -rw-r--r-- | src/server/api/endpoints/admin/unsuspend-user.ts | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/server/api/endpoints/admin/unsuspend-user.ts b/src/server/api/endpoints/admin/unsuspend-user.ts index 5c736122bb..7c5eedee46 100644 --- a/src/server/api/endpoints/admin/unsuspend-user.ts +++ b/src/server/api/endpoints/admin/unsuspend-user.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; import ID, { transform } from '../../../../misc/cafy-id'; -import getParams from '../../get-params'; +import define from '../../define'; import User from '../../../../models/user'; export const meta = { @@ -24,10 +24,7 @@ export const meta = { } }; -export default (params: any) => new Promise(async (res, rej) => { - const [ps, psErr] = getParams(meta, params); - if (psErr) return rej(psErr); - +export default define(meta, (ps) => new Promise(async (res, rej) => { const user = await User.findOne({ _id: ps.userId }); @@ -45,4 +42,4 @@ export default (params: any) => new Promise(async (res, rej) => { }); res(); -}); +})); |