1 import { makeDeleteRequest, makeGetRequest, makePutBodyRequest } from '../'
2 import { CustomConfig } from '../../../../shared/models/config/custom-config.model'
4 function getConfig (url: string) {
5 const path = '/api/v1/config'
7 return makeGetRequest({
10 statusCodeExpected: 200
14 function getAbout (url: string) {
15 const path = '/api/v1/config/about'
17 return makeGetRequest({
20 statusCodeExpected: 200
24 function getCustomConfig (url: string, token: string, statusCodeExpected = 200) {
25 const path = '/api/v1/config/custom'
27 return makeGetRequest({
35 function updateCustomConfig (url: string, token: string, newCustomConfig: CustomConfig, statusCodeExpected = 200) {
36 const path = '/api/v1/config/custom'
38 return makePutBodyRequest({
42 fields: newCustomConfig,
47 function deleteCustomConfig (url: string, token: string, statusCodeExpected = 200) {
48 const path = '/api/v1/config/custom'
50 return makeDeleteRequest({
58 // ---------------------------------------------------------------------------