refactor: privileged actions
This commit is contained in:
parent
357fe75427
commit
7680b2f85a
5 changed files with 29 additions and 78 deletions
|
|
@ -6,7 +6,7 @@ function validateUser (username, password) {
|
|||
const q2 = t.none('UPDATE users SET last_accessed = now() WHERE username=$1', [username])
|
||||
|
||||
return t.batch([q1, q2])
|
||||
.then(([user, _]) => user)
|
||||
.then(([user]) => user)
|
||||
.catch(() => false)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue