mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-28 01:29:27 +01:00
Update libraries reorder and get all authors routes
This commit is contained in:
parent
eede2bbd46
commit
3c0fdff7b4
@ -82,10 +82,10 @@ export default {
|
||||
})
|
||||
var newOrder = libraryOrderData.map((lib) => lib.id).join(',')
|
||||
if (currOrder !== newOrder) {
|
||||
this.$axios.$post('/api/libraries/order', libraryOrderData).then((libraries) => {
|
||||
if (libraries && libraries.length) {
|
||||
this.$axios.$post('/api/libraries/order', libraryOrderData).then((response) => {
|
||||
if (response.libraries && response.libraries.length) {
|
||||
this.$toast.success('Library order saved', { timeout: 1500 })
|
||||
this.$store.commit('libraries/set', libraries)
|
||||
this.$store.commit('libraries/set', response.libraries)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -48,10 +48,13 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async init() {
|
||||
this.authors = await this.$axios.$get(`/api/libraries/${this.currentLibraryId}/authors`).catch((error) => {
|
||||
console.error('Failed to load authors', error)
|
||||
return []
|
||||
})
|
||||
this.authors = await this.$axios
|
||||
.$get(`/api/libraries/${this.currentLibraryId}/authors`)
|
||||
.then((response) => response.authors)
|
||||
.catch((error) => {
|
||||
console.error('Failed to load authors', error)
|
||||
return []
|
||||
})
|
||||
this.loading = false
|
||||
},
|
||||
authorAdded(author) {
|
||||
|
Loading…
Reference in New Issue
Block a user