mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-01-25 06:41:36 -07:00
if elimination (#2635)
This commit is contained in:
parent
44c460dded
commit
fb5cd058e6
1 changed files with 2 additions and 4 deletions
|
@ -25,10 +25,8 @@ export default (endpoint: string, user: IUser, app: IApp, data: any, file?: any)
|
|||
return rej('YOU_ARE_NOT_ADMIN');
|
||||
}
|
||||
|
||||
if (app && ep.meta.kind) {
|
||||
if (!app.permission.some(p => p === ep.meta.kind)) {
|
||||
return rej('PERMISSION_DENIED');
|
||||
}
|
||||
if (app && ep.meta.kind && !app.permission.some(p => p === ep.meta.kind)) {
|
||||
return rej('PERMISSION_DENIED');
|
||||
}
|
||||
|
||||
if (ep.meta.requireCredential && ep.meta.limit) {
|
||||
|
|
Loading…
Reference in a new issue