summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-07-13 23:20:40 +0900
committerGitHub <noreply@github.com>2018-07-13 23:20:40 +0900
commit09416c9893a7c0ee6cd056e54aa33ab2ef374f55 (patch)
tree7904245e443ab3f67e55575e634e1e00577191c4 /src
parentMerge pull request #1891 from syuilo/greenkeeper/html-minifier-3.5.19 (diff)
parent🤖 Fix a bug (diff)
downloadsharkey-09416c9893a7c0ee6cd056e54aa33ab2ef374f55.tar.gz
sharkey-09416c9893a7c0ee6cd056e54aa33ab2ef374f55.tar.bz2
sharkey-09416c9893a7c0ee6cd056e54aa33ab2ef374f55.zip
Merge pull request #1892 from PRB0t/pr-201807131656
Fix a bug
Diffstat (limited to 'src')
-rw-r--r--src/server/api/call.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/api/call.ts b/src/server/api/call.ts
index 2b00f5df0a..255ae61ad6 100644
--- a/src/server/api/call.ts
+++ b/src/server/api/call.ts
@@ -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');