refactor: user agent parsing
This commit is contained in:
parent
791b275cdf
commit
839e6aae47
8 changed files with 21 additions and 63 deletions
|
|
@ -1,8 +1,8 @@
|
|||
const db = require('./db')
|
||||
|
||||
function getTokenList (browser, os) {
|
||||
const sql = `select * from user_tokens where browser_version=$1 and os_version=$2`
|
||||
return db.any(sql, [browser, os])
|
||||
function getTokenList () {
|
||||
const sql = `select * from user_tokens`
|
||||
return db.any(sql)
|
||||
}
|
||||
|
||||
function revokeToken (token) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue