mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 14:07:38 -07:00
Fix bug?
This commit is contained in:
parent
2556f41c30
commit
c17c12d684
2 changed files with 5 additions and 4 deletions
|
@ -53,8 +53,9 @@ export default Vue.extend({
|
|||
this.signing = true;
|
||||
|
||||
(this as any).api('signin', {
|
||||
username: this.username,
|
||||
password: this.password,
|
||||
// password という名前(または username とのペア?)では何らかのフィルタリングがされるっぽい?
|
||||
x: this.username,
|
||||
y: this.password,
|
||||
token: this.user && this.user.twoFactorEnabled ? this.token : undefined
|
||||
}).then(() => {
|
||||
location.reload();
|
||||
|
|
|
@ -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'];
|
||||
const password = body['password'];
|
||||
const username = body['username'] || body['x'];
|
||||
const password = body['password'] || body['y'];
|
||||
const token = body['token'];
|
||||
|
||||
if (typeof username != 'string') {
|
||||
|
|
Loading…
Reference in a new issue