Update njodb version

This commit is contained in:
advplyr 2022-01-24 16:53:35 -06:00
parent ff4ca0f675
commit 5bd6c8f553
3 changed files with 13 additions and 8 deletions

8
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "audiobookshelf", "name": "audiobookshelf",
"version": "1.6.53", "version": "1.6.59",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -1255,9 +1255,9 @@
"integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
}, },
"njodb": { "njodb": {
"version": "0.4.27", "version": "0.4.29",
"resolved": "https://registry.npmjs.org/njodb/-/njodb-0.4.27.tgz", "resolved": "https://registry.npmjs.org/njodb/-/njodb-0.4.29.tgz",
"integrity": "sha512-2VWnqv953eQPtly9FDREcikF1sB9mcqAlzcmjHXR0L0my8Xvo4ctMShmwU2W1YpKdtDgFxsqF/S1a4vtv/MzjQ==", "integrity": "sha512-t9zCtrt9jZcpMYyqjtTi7+jea/y9TA6ZhHj9AkZh4pf1cJ2UYNz2EZgCifS4Izwu6R4ypaCblMgU3EwjZgTp2Q==",
"requires": { "requires": {
"proper-lockfile": "^4.1.2" "proper-lockfile": "^4.1.2"
} }

View File

@ -43,9 +43,9 @@
"ip": "^1.1.5", "ip": "^1.1.5",
"jsonwebtoken": "^8.5.1", "jsonwebtoken": "^8.5.1",
"libgen": "^2.1.0", "libgen": "^2.1.0",
"njodb": "^0.4.27", "njodb": "^0.4.29",
"node-ffprobe": "^3.0.0",
"node-cron": "^3.0.0", "node-cron": "^3.0.0",
"node-ffprobe": "^3.0.0",
"node-stream-zip": "^1.15.0", "node-stream-zip": "^1.15.0",
"podcast": "^1.3.0", "podcast": "^1.3.0",
"read-chunk": "^3.1.0", "read-chunk": "^3.1.0",
@ -56,4 +56,4 @@
"xml2js": "^0.4.23" "xml2js": "^0.4.23"
}, },
"devDependencies": {} "devDependencies": {}
} }

View File

@ -258,7 +258,12 @@ class Db {
} }
return entityDb.update((record) => record.id === entity.id, () => jsonEntity).then((results) => { return entityDb.update((record) => record.id === entity.id, () => jsonEntity).then((results) => {
Logger.debug(`[DB] Updated ${entityName}: ${results.updated}`) if (process.env.NODE_ENV !== 'production') {
Logger.debug(`[DB] Updated ${entityName}: ${results.updated} | Selected: ${results.selected}`)
} else {
Logger.debug(`[DB] Updated ${entityName}: ${results.updated}`)
}
var arrayKey = this.getEntityArrayKey(entityName) var arrayKey = this.getEntityArrayKey(entityName)
this[arrayKey] = this[arrayKey].map(e => { this[arrayKey] = this[arrayKey].map(e => {
return e.id === entity.id ? entity : e return e.id === entity.id ? entity : e