Update call.ts

This commit is contained in:
syuilo 2018-07-10 22:07:24 +09:00
parent 94ff21649d
commit e32bf34830

View file

@ -8,6 +8,10 @@ export default (endpoint: string | Endpoint, user: IUser, app: IApp, data: any,
const ep = typeof endpoint == 'string' ? endpoints.find(e => e.name == endpoint) : endpoint; const ep = typeof endpoint == 'string' ? endpoints.find(e => e.name == endpoint) : endpoint;
if (ep.name.includes('.') {
return rej('INVALID_ENDPOINT');
}
if (ep.secure && !isSecure) { if (ep.secure && !isSecure) {
return rej('ACCESS_DENIED'); return rej('ACCESS_DENIED');
} }