mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-13 19:33:46 +00:00
settings api
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import axios from 'axios';
|
||||
import { serverURL } from './apiConstants';
|
||||
export const settingsNamespace = 'settings';
|
||||
export const settingsURL = serverURL + settingsNamespace;
|
||||
|
||||
export const fetchSettings = async () => {
|
||||
const res = await axios.get(settingsURL);
|
||||
return res.data;
|
||||
};
|
||||
|
||||
export const postSettings = async (data) => {
|
||||
console.log('debug sending', data)
|
||||
console.log('debug await', await axios.post(settingsURL, data))
|
||||
const res = await axios.post(settingsURL, data);
|
||||
return res;
|
||||
};
|
||||
Reference in New Issue
Block a user