Update:EReaders to use new ebook API routes

This commit is contained in:
advplyr 2023-06-04 11:13:05 -05:00
parent 9acf695802
commit 195e33ae32
5 changed files with 47 additions and 29 deletions

View file

@ -38,6 +38,9 @@ export default {
}
},
computed: {
userToken() {
return this.$store.getters['user/getToken']
},
/** @returns {string} */
libraryItemId() {
return this.libraryItem?.id
@ -235,7 +238,11 @@ export default {
/** @type {ePub.Book} */
reader.book = new ePub(reader.url, {
width: window.innerWidth,
height: window.innerHeight - this.readerHeightOffset
height: window.innerHeight - this.readerHeightOffset,
openAs: 'epub',
requestHeaders: {
Authorization: `Bearer ${this.userToken}`
}
})
/** @type {ePub.Rendition} */