mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-15 08:19:37 +00:00
Update library items batch get route
This commit is contained in:
parent
3c0fdff7b4
commit
0ae853c119
3 changed files with 21 additions and 15 deletions
|
|
@ -96,11 +96,14 @@ export default {
|
|||
}
|
||||
|
||||
const libraryItemIds = store.state.globals.selectedMediaItems.map((i) => i.id)
|
||||
const libraryItems = await app.$axios.$post(`/api/items/batch/get`, { libraryItemIds }).catch((error) => {
|
||||
const errorMsg = error.response.data || 'Failed to get items'
|
||||
console.error(errorMsg, error)
|
||||
return []
|
||||
})
|
||||
const libraryItems = await app.$axios
|
||||
.$post(`/api/items/batch/get`, { libraryItemIds })
|
||||
.then((res) => res.libraryItems)
|
||||
.catch((error) => {
|
||||
const errorMsg = error.response.data || 'Failed to get items'
|
||||
console.error(errorMsg, error)
|
||||
return []
|
||||
})
|
||||
return {
|
||||
mediaType: libraryItems[0].mediaType,
|
||||
libraryItems
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue