mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 17:03:49 +01:00
commit
3fd0a3460b
@ -6,7 +6,8 @@ import { IApp } from '../../models/app';
|
||||
export default (endpoint: string | Endpoint, user: IUser, app: IApp, data: any, file?: any) => new Promise<any>(async (ok, rej) => {
|
||||
const isSecure = user != null && app == null;
|
||||
|
||||
const ep = typeof endpoint == 'string' ? endpoints.find(e => e.name == endpoint) : endpoint;
|
||||
const epName = typeof endpoint === 'string' ? endpoint : endpoint.name;
|
||||
const ep = endpoints.find(e => e.name === epName);
|
||||
|
||||
if (ep.name.includes('.')) {
|
||||
return rej('INVALID_ENDPOINT');
|
||||
|
Loading…
Reference in New Issue
Block a user