New model updates for series, collections, authors routes

This commit is contained in:
advplyr 2022-03-12 18:50:31 -06:00
parent 73257188f6
commit 2d19208340
19 changed files with 432 additions and 247 deletions

View file

@ -99,11 +99,11 @@ class BookMetadata {
return this.title + '&' + this.authorName
}
hasAuthor(authorName) {
return !!this.authors.find(au => au.name == authorName)
hasAuthor(id) {
return !!this.authors.find(au => au.id == id)
}
hasSeries(seriesName) {
return !!this.series.find(se => se.name == seriesName)
hasSeries(seriesId) {
return !!this.series.find(se => se.id == seriesId)
}
hasNarrator(narratorName) {
return this.narrators.includes(narratorName)