2023-10-04 09:30:05 +02:00
|
|
|
import { httpClientFactory } from '@/services/httpClientFactory'
|
|
|
|
|
|
|
|
const apiClient = httpClientFactory('api')
|
|
|
|
|
|
|
|
export default {
|
2024-02-29 13:42:28 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @returns
|
|
|
|
*/
|
2024-09-20 09:58:53 +02:00
|
|
|
getAll(config = {}) {
|
2024-02-29 13:42:28 +01:00
|
|
|
return apiClient.get('/settings', { ...config })
|
|
|
|
},
|
|
|
|
|
2023-10-04 09:30:05 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @returns
|
|
|
|
*/
|
2024-09-20 09:58:53 +02:00
|
|
|
update(name, value, config = {}) {
|
|
|
|
return apiClient.put('/settings/' + name, { value: value }, { ...config })
|
2023-10-04 09:30:05 +02:00
|
|
|
},
|
|
|
|
|
2024-02-29 13:42:28 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @returns
|
|
|
|
*/
|
|
|
|
delete(name, config = {}) {
|
|
|
|
return apiClient.delete('/settings/' + name, { ...config })
|
|
|
|
},
|
2023-10-04 09:30:05 +02:00
|
|
|
}
|