mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-03-04 07:18:50 -07:00
アカウントを凍結されていたらAPIにアクセスできないようにした
This commit is contained in:
parent
5e4b72577a
commit
00b833644b
1 changed files with 4 additions and 0 deletions
|
@ -17,6 +17,10 @@ export default (endpoint: string | Endpoint, user: IUser, app: IApp, data: any,
|
|||
return rej('SIGNIN_REQUIRED');
|
||||
}
|
||||
|
||||
if (ep.withCredential && user.isSuspended) {
|
||||
return rej('YOUR_ACCOUNT_HAS_BEEN_SUSPENDED');
|
||||
}
|
||||
|
||||
if (app && ep.kind) {
|
||||
if (!app.permission.some(p => p === ep.kind)) {
|
||||
return rej('PERMISSION_DENIED');
|
||||
|
|
Loading…
Add table
Reference in a new issue