refactor checkToken
This commit is contained in:
@@ -78,11 +78,10 @@ router.post(
|
||||
}
|
||||
}
|
||||
|
||||
const { jwtSecret } = Config.get().security;
|
||||
let user;
|
||||
|
||||
try {
|
||||
const userTokenData = await checkToken(token, jwtSecret, true);
|
||||
const userTokenData = await checkToken(token);
|
||||
user = userTokenData.user;
|
||||
} catch {
|
||||
throw FieldErrors({
|
||||
|
||||
Reference in New Issue
Block a user