test: should update json file

This commit is contained in:
Typicode
2016-05-15 16:31:48 +02:00
parent 2ce4590e93
commit 71b6c95b4a
5 changed files with 28 additions and 10 deletions

View File

@ -24,7 +24,7 @@ module.exports = function (source) {
var db
if (_.isObject(source)) {
db = low()
db.state(source)
db.setState(source)
} else {
db = low(source, { storage: fileAsync })
}
@ -45,7 +45,7 @@ module.exports = function (source) {
// GET /db
function showDatabase (req, res, next) {
res.locals.data = db.state()
res.locals.data = db.getState()
next()
}