refactor: don't use parameter in DB query

This commit is contained in:
siiky 2024-09-12 16:23:20 +01:00
parent a3ea347b9e
commit 6f7746c564

View file

@ -239,12 +239,12 @@ function plugins (settings, deviceId) {
function fetchCurrentConfigVersion () {
const sql = `select id from user_config
where type=$1
where type='config'
and valid
order by id desc
limit 1`
return db.one(sql, ['config'])
return db.one(sql)
.then(row => row.id)
}