added suspending admin email to error screen
This commit is contained in:
@ -76,7 +76,8 @@ export default function auth() {
|
||||
}
|
||||
|
||||
if (user.isSuspended) {
|
||||
throw new UserSuspendedError();
|
||||
const suspendingAdmin = await User.findById(user.suspendedById);
|
||||
throw new UserSuspendedError({ adminEmail: suspendingAdmin.email });
|
||||
}
|
||||
|
||||
ctx.state.token = token;
|
||||
|
Reference in New Issue
Block a user