diff --git a/server/controllers/AuthorController.js b/server/controllers/AuthorController.js index c217dab0..c8bda43b 100644 --- a/server/controllers/AuthorController.js +++ b/server/controllers/AuthorController.js @@ -244,7 +244,7 @@ class AuthorController { } 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 (req.method == 'DELETE' && !req.user.canDelete) { diff --git a/server/models/Author.js b/server/models/Author.js index 9dd8705a..b100bbd8 100644 --- a/server/models/Author.js +++ b/server/models/Author.js @@ -16,6 +16,7 @@ module.exports = (sequelize) => { name: this.name, description: this.description, imagePath: this.imagePath, + libraryId: this.libraryId, addedAt: this.createdAt.valueOf(), updatedAt: this.updatedAt.valueOf() }) @@ -46,7 +47,8 @@ module.exports = (sequelize) => { name: oldAuthor.name, asin: oldAuthor.asin, description: oldAuthor.description, - imagePath: oldAuthor.imagePath + imagePath: oldAuthor.imagePath, + libraryId: oldAuthor.libraryId } } diff --git a/server/models/Series.js b/server/models/Series.js index 1baf96c8..85519b98 100644 --- a/server/models/Series.js +++ b/server/models/Series.js @@ -14,6 +14,7 @@ module.exports = (sequelize) => { id: this.id, name: this.name, description: this.description, + libraryId: this.libraryId, addedAt: this.createdAt.valueOf(), updatedAt: this.updatedAt.valueOf() }) @@ -42,7 +43,8 @@ module.exports = (sequelize) => { return { id: oldSeries.id, name: oldSeries.name, - description: oldSeries.description + description: oldSeries.description, + libraryId: oldSeries.libraryId } }