[web] Change the settings API calls

This commit is contained in:
Alain Nussbaumer 2025-05-11 20:44:30 +02:00
parent a229474da7
commit c34c5eb585
2 changed files with 6 additions and 4 deletions

View File

@ -1,10 +1,12 @@
import api from '@/api' import api from '@/api'
const BASE_URL = './api/settings'
export default { export default {
state() { state() {
return api.get('./api/settings') return api.get(BASE_URL)
}, },
update(categoryName, option) { update(option) {
return api.put(`./api/settings/${categoryName}/${option.name}`, option) return api.put(`${BASE_URL}/${option.category}/${option.name}`, option)
} }
} }

View File

@ -61,7 +61,7 @@ export default {
value value
} }
settings settings
.update(this.category, setting) .update(setting)
.then(() => { .then(() => {
window.clearTimeout(this.timerId) window.clearTimeout(this.timerId)
this.settingsStore.update(setting) this.settingsStore.update(setting)