mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-01 08:44:40 +02:00
Cleanup and remove more vars
This commit is contained in:
parent
45c9038954
commit
775dedc338
5 changed files with 18 additions and 33 deletions
|
@ -40,7 +40,7 @@ class Author {
|
|||
}
|
||||
|
||||
toJSONExpanded(numBooks = 0) {
|
||||
var json = this.toJSON()
|
||||
const json = this.toJSON()
|
||||
json.numBooks = numBooks
|
||||
return json
|
||||
}
|
||||
|
@ -63,11 +63,11 @@ class Author {
|
|||
}
|
||||
|
||||
update(payload) {
|
||||
var json = this.toJSON()
|
||||
const json = this.toJSON()
|
||||
delete json.id
|
||||
delete json.addedAt
|
||||
delete json.updatedAt
|
||||
var hasUpdates = false
|
||||
let hasUpdates = false
|
||||
for (const key in json) {
|
||||
if (payload[key] !== undefined && json[key] != payload[key]) {
|
||||
this[key] = payload[key]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue