Update:API endpoints for library and library item scan updated to POST requests

This commit is contained in:
advplyr 2023-02-03 17:50:42 -06:00
parent c93f17051a
commit b957e1a36b
6 changed files with 9 additions and 9 deletions

View file

@ -662,7 +662,7 @@ export default {
const axios = this.$axios || this.$nuxt.$axios
this.processing = true
axios
.$get(`/api/items/${this.libraryItemId}/scan`)
.$post(`/api/items/${this.libraryItemId}/scan`)
.then((data) => {
var result = data.result
if (!result) {

View file

@ -129,7 +129,7 @@ export default {
rescan() {
this.rescanning = true
this.$axios
.$get(`/api/items/${this.libraryItemId}/scan`)
.$post(`/api/items/${this.libraryItemId}/scan`)
.then((data) => {
this.rescanning = false
var result = data.result

View file

@ -66,7 +66,7 @@ export const getters = {
export const actions = {
requestLibraryScan({ state, commit }, { libraryId, force }) {
return this.$axios.$get(`/api/libraries/${libraryId}/scan`, { params: { force } })
return this.$axios.$post(`/api/libraries/${libraryId}/scan?force=${force ? 1 : 0}`)
},
loadFolders({ state, commit }) {
if (state.folders.length) {