quick fixes from previous commit

This commit is contained in:
Evert Prants 2020-12-13 16:50:19 +02:00
parent 444f8b00f8
commit 7674907b70
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
2 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -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