summaryrefslogtreecommitdiff
path: root/src/server/api/api-handler.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-08-01 08:34:22 +0900
committerGitHub <noreply@github.com>2018-08-01 08:34:22 +0900
commit77faf7a84cc28d9a24803940730e59706edd4ec8 (patch)
treea3a366deedc99a98bcfe7358eb48aff0ff5fe71c /src/server/api/api-handler.ts
parentNew translations ja.yml (English) (diff)
parentMerge pull request #2033 from syuilo/greenkeeper/qrcode-1.2.2 (diff)
downloadmisskey-77faf7a84cc28d9a24803940730e59706edd4ec8.tar.gz
misskey-77faf7a84cc28d9a24803940730e59706edd4ec8.tar.bz2
misskey-77faf7a84cc28d9a24803940730e59706edd4ec8.zip
Merge branch 'master' into l10n_master
Diffstat (limited to 'src/server/api/api-handler.ts')
-rw-r--r--src/server/api/api-handler.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/api/api-handler.ts b/src/server/api/api-handler.ts
index e716dcdc01..128c1a98d2 100644
--- a/src/server/api/api-handler.ts
+++ b/src/server/api/api-handler.ts
@@ -1,12 +1,12 @@
import * as Koa from 'koa';
-import { Endpoint } from './endpoints';
+import { IEndpoint } from './endpoints';
import authenticate from './authenticate';
import call from './call';
import { IUser } from '../../models/user';
import { IApp } from '../../models/app';
-export default async (endpoint: Endpoint, ctx: Koa.Context) => {
+export default async (endpoint: IEndpoint, ctx: Koa.Context) => {
const body = ctx.is('multipart/form-data') ? (ctx.req as any).body : ctx.request.body;
const reply = (x?: any, y?: any) => {
@@ -37,7 +37,7 @@ export default async (endpoint: Endpoint, ctx: Koa.Context) => {
// API invoking
try {
- res = await call(endpoint, user, app, body, (ctx.req as any).file);
+ res = await call(endpoint.name, user, app, body, (ctx.req as any).file);
} catch (e) {
reply(400, e);
return;