mirror of
https://github.com/typicode/json-server.git
synced 2025-07-30 05:31:41 +08:00
test: should update json file
This commit is contained in:
@ -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()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user