mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-05 20:41:57 +02:00
Add:Remove option for authors & show authors with 0 books on authors page #2124
This commit is contained in:
@@ -47,10 +47,14 @@ class BookAuthor extends Model {
|
||||
book.belongsToMany(author, { through: BookAuthor })
|
||||
author.belongsToMany(book, { through: BookAuthor })
|
||||
|
||||
book.hasMany(BookAuthor)
|
||||
book.hasMany(BookAuthor, {
|
||||
onDelete: 'CASCADE'
|
||||
})
|
||||
BookAuthor.belongsTo(book)
|
||||
|
||||
author.hasMany(BookAuthor)
|
||||
author.hasMany(BookAuthor, {
|
||||
onDelete: 'CASCADE'
|
||||
})
|
||||
BookAuthor.belongsTo(author)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user