refactor: user agent parsing

This commit is contained in:
Sérgio Salgado 2020-10-26 16:03:02 +00:00 committed by Josh Harvey
parent 791b275cdf
commit 839e6aae47
8 changed files with 21 additions and 63 deletions

View file

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