mirror of
https://github.com/misskey-dev/misskey
synced 2024-12-01 08:18:51 +09:00
enhance(server): アカウントが凍結されたときのエラーを判定しやすく
This commit is contained in:
parent
502bde5567
commit
a6958da091
@ -40,7 +40,12 @@ export default async (endpoint: string, user: User | null | undefined, token: Ac
|
||||
}
|
||||
|
||||
if (ep.meta.requireCredential && user!.isSuspended) {
|
||||
throw new ApiError(accessDenied, { reason: 'Your account has been suspended.' });
|
||||
throw new ApiError({
|
||||
message: 'Your account has been suspended.',
|
||||
code: 'YOUR_ACCOUNT_SUSPENDED',
|
||||
id: 'a8c724b3-6e9c-4b46-b1a8-bc3ed6258370',
|
||||
httpStatusCode: 403
|
||||
});
|
||||
}
|
||||
|
||||
if (ep.meta.requireAdmin && !user!.isAdmin) {
|
||||
|
Loading…
Reference in New Issue
Block a user