2023-10-04 09:30:05 +02:00
|
|
|
import { httpClientFactory } from '@/services/httpClientFactory'
|
|
|
|
|
|
|
|
const apiClient = httpClientFactory('api')
|
2023-10-05 14:05:42 +02:00
|
|
|
const webClient = httpClientFactory('web')
|
2023-10-04 09:30:05 +02:00
|
|
|
|
|
|
|
export default {
|
|
|
|
/**
|
2023-10-05 14:05:42 +02:00
|
|
|
* Update a user preference
|
2023-10-04 09:30:05 +02:00
|
|
|
*
|
2023-10-05 14:05:42 +02:00
|
|
|
* @param {string} name
|
|
|
|
* @param {any} value
|
|
|
|
* @returns promise
|
2023-10-04 09:30:05 +02:00
|
|
|
*/
|
2023-10-05 14:05:42 +02:00
|
|
|
updatePreference(name, value) {
|
2023-10-04 09:30:05 +02:00
|
|
|
return apiClient.put('/user/preferences/' + name, { value: value })
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|