mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-23 09:23:48 +01:00
if elimination (#2635)
This commit is contained in:
parent
44c460dded
commit
fb5cd058e6
@ -25,11 +25,9 @@ export default (endpoint: string, user: IUser, app: IApp, data: any, file?: any)
|
|||||||
return rej('YOU_ARE_NOT_ADMIN');
|
return rej('YOU_ARE_NOT_ADMIN');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (app && ep.meta.kind) {
|
if (app && ep.meta.kind && !app.permission.some(p => p === ep.meta.kind)) {
|
||||||
if (!app.permission.some(p => p === ep.meta.kind)) {
|
|
||||||
return rej('PERMISSION_DENIED');
|
return rej('PERMISSION_DENIED');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (ep.meta.requireCredential && ep.meta.limit) {
|
if (ep.meta.requireCredential && ep.meta.limit) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user