This commit is contained in:
syuilo
2018-04-13 09:44:00 +09:00
parent 61f21594a9
commit 22d2f2051c
10 changed files with 40 additions and 26 deletions

View File

@@ -11,9 +11,9 @@ export default async (ctx: Koa.Context) => {
ctx.set('Access-Control-Allow-Origin', config.url);
ctx.set('Access-Control-Allow-Credentials', 'true');
const username = ctx.body['username'];
const password = ctx.body['password'];
const token = ctx.body['token'];
const username = ctx.request.body['username'];
const password = ctx.request.body['password'];
const token = ctx.request.body['token'];
if (typeof username != 'string') {
ctx.status = 400;