Update call.ts

This commit is contained in:
syuilo 2018-07-10 22:07:24 +09:00
parent c7e191c665
commit 12edef6f08

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;
if (ep.name.includes('.') {
return rej('INVALID_ENDPOINT');
}
if (ep.secure && !isSecure) {
return rej('ACCESS_DENIED');
}