mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-05 07:28:01 +00:00
9b5d536378
* refactor: cleanup project entry point * refactor: remove unused * refactor: folder restructure
19 lines
402 B
JavaScript
19 lines
402 B
JavaScript
import axios from 'axios';
|
|
|
|
import { eventURL } from './apiConstants';
|
|
|
|
/**
|
|
* @description HTTP request to fetch event data
|
|
* @return {Promise}
|
|
*/
|
|
export const fetchEvent = async () => {
|
|
const res = await axios.get(eventURL);
|
|
return res.data;
|
|
};
|
|
|
|
/**
|
|
* @description HTTP request to mutate event data
|
|
* @return {Promise}
|
|
*/
|
|
export const postEvent = async (data) => axios.post(eventURL, data);
|