mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-11-07 16:44:16 +01:00
Update author and series to include libraryId
This commit is contained in:
parent
0ac63b2678
commit
0a179e4eed
@ -244,7 +244,7 @@ class AuthorController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
middleware(req, res, next) {
|
middleware(req, res, next) {
|
||||||
var author = Database.authors.find(au => au.id === req.params.id)
|
const author = Database.authors.find(au => au.id === req.params.id)
|
||||||
if (!author) return res.sendStatus(404)
|
if (!author) return res.sendStatus(404)
|
||||||
|
|
||||||
if (req.method == 'DELETE' && !req.user.canDelete) {
|
if (req.method == 'DELETE' && !req.user.canDelete) {
|
||||||
|
@ -16,6 +16,7 @@ module.exports = (sequelize) => {
|
|||||||
name: this.name,
|
name: this.name,
|
||||||
description: this.description,
|
description: this.description,
|
||||||
imagePath: this.imagePath,
|
imagePath: this.imagePath,
|
||||||
|
libraryId: this.libraryId,
|
||||||
addedAt: this.createdAt.valueOf(),
|
addedAt: this.createdAt.valueOf(),
|
||||||
updatedAt: this.updatedAt.valueOf()
|
updatedAt: this.updatedAt.valueOf()
|
||||||
})
|
})
|
||||||
@ -46,7 +47,8 @@ module.exports = (sequelize) => {
|
|||||||
name: oldAuthor.name,
|
name: oldAuthor.name,
|
||||||
asin: oldAuthor.asin,
|
asin: oldAuthor.asin,
|
||||||
description: oldAuthor.description,
|
description: oldAuthor.description,
|
||||||
imagePath: oldAuthor.imagePath
|
imagePath: oldAuthor.imagePath,
|
||||||
|
libraryId: oldAuthor.libraryId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ module.exports = (sequelize) => {
|
|||||||
id: this.id,
|
id: this.id,
|
||||||
name: this.name,
|
name: this.name,
|
||||||
description: this.description,
|
description: this.description,
|
||||||
|
libraryId: this.libraryId,
|
||||||
addedAt: this.createdAt.valueOf(),
|
addedAt: this.createdAt.valueOf(),
|
||||||
updatedAt: this.updatedAt.valueOf()
|
updatedAt: this.updatedAt.valueOf()
|
||||||
})
|
})
|
||||||
@ -42,7 +43,8 @@ module.exports = (sequelize) => {
|
|||||||
return {
|
return {
|
||||||
id: oldSeries.id,
|
id: oldSeries.id,
|
||||||
name: oldSeries.name,
|
name: oldSeries.name,
|
||||||
description: oldSeries.description
|
description: oldSeries.description,
|
||||||
|
libraryId: oldSeries.libraryId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user