New data model update MeController user progress routes

This commit is contained in:
advplyr 2022-03-17 13:33:22 -05:00
parent c4eeb1cfb7
commit 1cf9e85272
13 changed files with 234 additions and 281 deletions

View file

@ -150,23 +150,6 @@ export default {
downloadClick() {
this.$store.commit('showEditModalOnTab', { libraryItem: this.book, tab: 'download' })
},
toggleRead() {
var updatePayload = {
isRead: !this.userIsRead
}
this.isProcessingReadUpdate = true
this.$axios
.$patch(`/api/me/audiobook/${this.libraryItemId}`, updatePayload)
.then(() => {
this.isProcessingReadUpdate = false
this.$toast.success(`"${this.title}" Marked as ${updatePayload.isRead ? 'Read' : 'Not Read'}`)
})
.catch((error) => {
console.error('Failed', error)
this.isProcessingReadUpdate = false
this.$toast.error(`Failed to mark as ${updatePayload.isRead ? 'Read' : 'Not Read'}`)
})
},
startStream() {
this.$eventBus.$emit('play-item', this.book.id)
},