summaryrefslogtreecommitdiff
path: root/src/server/api/call.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-11-02 13:47:44 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-11-02 13:47:44 +0900
commit174f8022eb5828db3e9af01afcf72fe7526c4c57 (patch)
tree3fab406b94f4244cf5330cf985a8eb518a1e027f /src/server/api/call.ts
parentBetter index (diff)
downloadsharkey-174f8022eb5828db3e9af01afcf72fe7526c4c57.tar.gz
sharkey-174f8022eb5828db3e9af01afcf72fe7526c4c57.tar.bz2
sharkey-174f8022eb5828db3e9af01afcf72fe7526c4c57.zip
Refactor
Diffstat (limited to 'src/server/api/call.ts')
-rw-r--r--src/server/api/call.ts8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/server/api/call.ts b/src/server/api/call.ts
index b87707c348..673d449199 100644
--- a/src/server/api/call.ts
+++ b/src/server/api/call.ts
@@ -42,18 +42,12 @@ export default (endpoint: string, user: IUser, app: IApp, data: any, file?: any)
}
}
- let exec = ep.exec;
-
- if (ep.meta.requireFile && file) {
- exec = exec.bind(null, file);
- }
-
let res;
// API invoking
try {
const before = performance.now();
- res = await exec(data, user, app);
+ res = await ep.exec(data, user, app, file);
const after = performance.now();
const time = after - before;