Update call.ts
This commit is contained in:
parent
94ff21649d
commit
e32bf34830
1 changed files with 4 additions and 0 deletions
|
@ -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');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue