From 7674907b7031873fd4accc054f84b2ca3a38fe7b Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Sun, 13 Dec 2020 16:50:19 +0200 Subject: [PATCH] quick fixes from previous commit --- server/api/index.js | 6 +++--- views/user/login.pug | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/api/index.js b/server/api/index.js index c897de0..4c28fab 100644 --- a/server/api/index.js +++ b/server/api/index.js @@ -181,7 +181,7 @@ export class Login { static async purgeTotp (user, password) { user = await User.ensureObject(user, ['password']) - const pwmatch = await User.Login.password(user, password) + const pwmatch = await Login.password(user, password) if (!pwmatch) return false // TODO: Inform user via email @@ -299,7 +299,7 @@ export class Register { const user = await models.User.query().insert(data) if (email) { - await User.Register.activationEmail(user, true) + await Register.activationEmail(user, true) } return user @@ -399,7 +399,7 @@ export class Reset { } static async changePassword (user, password, token) { - const hashed = await User.Register.hashPassword(password) + const hashed = await Register.hashPassword(password) await models.User.query().patchAndFetchById(user.id, { password: hashed, updated_at: new Date() }) await models.Token.query().delete().where('token', token) diff --git a/views/user/login.pug b/views/user/login.pug index 6c5cf45..20682ef 100644 --- a/views/user/login.pug +++ b/views/user/login.pug @@ -24,12 +24,12 @@ block body label(for="password") Password input.form-control(type="password", name="password", id="password") button.btn.btn-primary(type="submit") Log in - | or + | or  a(href="/register") Create an account - | · + | ·  a(href="/login/reset") Forgot password? if auth - | · + | ·  a.show-more(href="#",data-toggle="#extlogins") More options.. .show-more-cnt.mt-4#extlogins if !registrations