Revert "Fix bug?"

This reverts commit 2c9bacfcea.
This commit is contained in:
syuilo 2018-08-21 01:23:39 +09:00
parent 30444e5f1a
commit fd947407af
2 changed files with 4 additions and 5 deletions

View file

@ -53,9 +53,8 @@ export default Vue.extend({
this.signing = true;
(this as any).api('signin', {
// password ( username )
x: this.username,
y: this.password,
username: this.username,
password: this.password,
token: this.user && this.user.twoFactorEnabled ? this.token : undefined
}).then(() => {
location.reload();

View file

@ -12,8 +12,8 @@ export default async (ctx: Koa.Context) => {
ctx.set('Access-Control-Allow-Credentials', 'true');
const body = ctx.request.body as any;
const username = body['username'] || body['x'];
const password = body['password'] || body['y'];
const username = body['username'];
const password = body['password'];
const token = body['token'];
if (typeof username != 'string') {