feat: update the customer's last_used_machine on auth attempt
This commit is contained in:
parent
bb303a38cf
commit
53830aba52
2 changed files with 8 additions and 7 deletions
|
|
@ -930,9 +930,9 @@ function disableTestCustomer (customerId) {
|
|||
return db.none(sql, [customerId])
|
||||
}
|
||||
|
||||
function updateLastAuthAttempt (customerId) {
|
||||
const sql = `UPDATE customers SET last_auth_attempt=NOW() WHERE id=$1`
|
||||
return db.none(sql, [customerId])
|
||||
function updateLastAuthAttempt (customerId, deviceId) {
|
||||
const sql = `UPDATE customers SET last_auth_attempt=NOW(), last_used_machine=$2 WHERE id=$1`
|
||||
return db.none(sql, [customerId, deviceId])
|
||||
}
|
||||
|
||||
function getExternalComplianceMachine (customer) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue