diff --git a/client/components/tables/library/LibrariesTable.vue b/client/components/tables/library/LibrariesTable.vue index 90e4cf1a..9f8360cb 100644 --- a/client/components/tables/library/LibrariesTable.vue +++ b/client/components/tables/library/LibrariesTable.vue @@ -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) } }) } diff --git a/client/pages/library/_library/authors/index.vue b/client/pages/library/_library/authors/index.vue index beb36c3f..1f8e385b 100644 --- a/client/pages/library/_library/authors/index.vue +++ b/client/pages/library/_library/authors/index.vue @@ -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) {