mirror of
https://github.com/gotson/komga.git
synced 2026-05-08 21:00:16 +02:00
first version of the web reader
This commit is contained in:
parent
5628babcc5
commit
34551633ee
1 changed files with 12 additions and 0 deletions
|
|
@ -44,4 +44,16 @@ export default class KomgaBooksService {
|
|||
throw new Error(msg)
|
||||
}
|
||||
}
|
||||
|
||||
async getBookPages (bookId: number): Promise<PageDto[]> {
|
||||
try {
|
||||
return (await this.http.get(`${API_BOOKS}/${bookId}/pages`)).data
|
||||
} catch (e) {
|
||||
let msg = 'An error occurred while trying to retrieve book pages'
|
||||
if (e.response.data.message) {
|
||||
msg += `: ${e.response.data.message}`
|
||||
}
|
||||
throw new Error(msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue