summaryrefslogtreecommitdiff
path: root/src/server/api/call.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-13 09:44:00 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-13 09:44:00 +0900
commit22d2f2051c4cbe3da5b9ece674f36a6555f8c953 (patch)
tree0c29ea7c8f1797f9a28cab2d70d31e91cd9cb312 /src/server/api/call.ts
parentwip (diff)
downloadsharkey-22d2f2051c4cbe3da5b9ece674f36a6555f8c953.tar.gz
sharkey-22d2f2051c4cbe3da5b9ece674f36a6555f8c953.tar.bz2
sharkey-22d2f2051c4cbe3da5b9ece674f36a6555f8c953.zip
wip
Diffstat (limited to 'src/server/api/call.ts')
-rw-r--r--src/server/api/call.ts4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/server/api/call.ts b/src/server/api/call.ts
index c25f55ed3f..cc40294657 100644
--- a/src/server/api/call.ts
+++ b/src/server/api/call.ts
@@ -6,11 +6,9 @@ import limitter from './limitter';
import { IUser } from '../../models/user';
import { IApp } from '../../models/app';
-export default (endpoint: string | Endpoint, user: IUser, app: IApp, data: any, req?: http.IncomingMessage) => new Promise(async (ok, rej) => {
+export default (endpoint: string | Endpoint, user: IUser, app: IApp, data: any, req?: http.IncomingMessage) => new Promise<any>(async (ok, rej) => {
const isSecure = user != null && app == null;
- //console.log(endpoint, user, app, data);
-
const ep = typeof endpoint == 'string' ? endpoints.find(e => e.name == endpoint) : endpoint;
if (ep.secure && !isSecure) {