update remaining code for versioned config

This commit is contained in:
Josh Harvey 2016-12-09 11:36:29 +02:00
parent 2c6177bff9
commit e6cd0d9473
6 changed files with 25 additions and 20 deletions

View file

@ -7,7 +7,10 @@ function pp (o) {
}
function dbFetchConfig () {
return db.oneOrNone('select data from user_config where type=$1', ['config'])
return db.oneOrNone(
'select data from user_config where type=$1 order by id desc limit 1',
['config']
)
.then(row => row && row.data)
}