Fix:Relative file path for single book scans, Change:Route names & refactor api

This commit is contained in:
advplyr 2021-11-21 20:00:40 -06:00
parent 2194d55cc0
commit 66a490365a
41 changed files with 1057 additions and 986 deletions

View file

@ -133,7 +133,7 @@ export default {
publisher: true,
publishYear: true,
series: true,
volumeNumber: true,
volumeNumber: true
}
}
},
@ -198,7 +198,7 @@ export default {
publisher: true,
publishYear: true,
series: true,
volumeNumber: true,
volumeNumber: true
}
if (this.audiobook.id !== this.audiobookId) {
@ -238,7 +238,7 @@ export default {
var coverPayload = {
url: updatePayload.cover
}
var success = await this.$axios.$post(`/api/audiobook/${this.audiobook.id}/cover`, coverPayload).catch((error) => {
var success = await this.$axios.$post(`/api/books/${this.audiobook.id}/cover`, coverPayload).catch((error) => {
console.error('Failed to update', error)
return false
})
@ -255,7 +255,7 @@ export default {
var bookUpdatePayload = {
book: updatePayload
}
var success = await this.$axios.$patch(`/api/audiobook/${this.audiobook.id}`, bookUpdatePayload).catch((error) => {
var success = await this.$axios.$patch(`/api/books/${this.audiobook.id}`, bookUpdatePayload).catch((error) => {
console.error('Failed to update', error)
return false
})