There was an error while loading. Please reload this page.
1 parent 4b36016 commit a0e55b8Copy full SHA for a0e55b8
1 file changed
src/server/router/index.js
@@ -4,7 +4,7 @@ const _ = require('lodash')
4
const lodashId = require('lodash-id')
5
const low = require('lowdb')
6
const Memory = require('lowdb/adapters/Memory')
7
-const FileAsync = require('lowdb/adapters/FileAsync')
+const FileSync = require('lowdb/adapters/FileSync')
8
const bodyParser = require('../body-parser')
9
const validateData = require('./validate-data')
10
const plural = require('./plural')
@@ -14,7 +14,7 @@ const mixins = require('../mixins')
14
15
module.exports = (db, opts = { foreignKeySuffix: 'Id' }) => {
16
if (typeof db === 'string') {
17
- db = low(new FileAsync(db))
+ db = low(new FileSync(db))
18
} else if (!_.has(db, '__chain__') || !_.has(db, '__wrapped__')) {
19
db = low(new Memory()).setState(db)
20
}
0 commit comments