mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-04 02:05:06 +02:00
Add:Remove option for authors & show authors with 0 books on authors page #2124
This commit is contained in:
parent
0367d9ec2a
commit
10011d3886
19 changed files with 79 additions and 5 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue