Skip to content

Commit

Permalink
Updates to LibraryController to use new Library model
Browse files Browse the repository at this point in the history
- Additional validation on API endpoints
- Removed success toast when reorder libraries
  • Loading branch information
advplyr committed Aug 24, 2024
1 parent e0de59a commit 5d13fae
Show file tree
Hide file tree
Showing 12 changed files with 259 additions and 168 deletions.
5 changes: 2 additions & 3 deletions client/components/tables/library/LibrariesTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ export default {
var newOrder = libraryOrderData.map((lib) => lib.id).join(',')
if (currOrder !== newOrder) {
this.$axios.$post('/api/libraries/order', libraryOrderData).then((response) => {
if (response.libraries && response.libraries.length) {
this.$toast.success('Library order saved', { timeout: 1500 })
if (response.libraries?.length) {
this.$store.commit('libraries/set', response.libraries)
}
})
Expand Down Expand Up @@ -110,4 +109,4 @@ export default {
this.$store.commit('libraries/removeListener', 'libraries-table')
}
}
</script>
</script>
3 changes: 1 addition & 2 deletions server/Watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,8 @@ class FolderWatcher extends EventEmitter {
}

/**
* TODO: Update to new library model
*
* @param {import('./objects/Library')} library
* @param {import('./models/Library')} library
*/
updateLibrary(library) {
if (this.disabled) return
Expand Down
Loading

0 comments on commit 5d13fae

Please sign in to comment.