From 5a32fba88e1dcf6ef80fe0d7b0fa875dadf14390 Mon Sep 17 00:00:00 2001 From: advplyr Date: Mon, 3 Jan 2022 07:59:24 -0600 Subject: [PATCH] Fix:Batch new collection #282 --- client/components/modals/UserCollectionsModal.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/components/modals/UserCollectionsModal.vue b/client/components/modals/UserCollectionsModal.vue index 1242e83a..a6832023 100644 --- a/client/components/modals/UserCollectionsModal.vue +++ b/client/components/modals/UserCollectionsModal.vue @@ -102,6 +102,9 @@ export default { }, selectedBookIds() { return this.$store.state.selectedAudiobooks || [] + }, + currentLibraryId() { + return this.$store.state.libraries.currentLibraryId } }, methods: { @@ -186,9 +189,10 @@ export default { var books = this.showBatchUserCollectionModal ? this.selectedBookIds : [this.selectedAudiobookId] var newCollection = { books: books, - libraryId: this.selectedAudiobook.libraryId, + libraryId: this.currentLibraryId, name: this.newCollectionName } + this.$axios .$post('/api/collections', newCollection) .then((data) => {