mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-06-08 19:52:50 +02:00
Clean up ApiRouter adding MiscController, move upload and scan to api endpoints
This commit is contained in:
@@ -33,6 +33,14 @@ export const getters = {
|
||||
}
|
||||
|
||||
export const actions = {
|
||||
requestLibraryScan({ state, commit }, { libraryId, force }) {
|
||||
this.$axios.$get(`/api/libraries/${libraryId}/scan`, { params: { force } }).then(() => {
|
||||
this.$toast.success('Library scan started')
|
||||
}).catch((error) => {
|
||||
console.error('Failed to start scan', error)
|
||||
this.$toast.error('Failed to start scan')
|
||||
})
|
||||
},
|
||||
loadFolders({ state, commit }) {
|
||||
if (state.folders.length) {
|
||||
var lastCheck = Date.now() - state.folderLastUpdate
|
||||
|
||||
Reference in New Issue
Block a user