refactor: don't use parameter in DB query
This commit is contained in:
parent
a3ea347b9e
commit
6f7746c564
1 changed files with 2 additions and 2 deletions
|
|
@ -239,12 +239,12 @@ function plugins (settings, deviceId) {
|
||||||
|
|
||||||
function fetchCurrentConfigVersion () {
|
function fetchCurrentConfigVersion () {
|
||||||
const sql = `select id from user_config
|
const sql = `select id from user_config
|
||||||
where type=$1
|
where type='config'
|
||||||
and valid
|
and valid
|
||||||
order by id desc
|
order by id desc
|
||||||
limit 1`
|
limit 1`
|
||||||
|
|
||||||
return db.one(sql, ['config'])
|
return db.one(sql)
|
||||||
.then(row => row.id)
|
.then(row => row.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue