mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-20 06:29:07 +00:00
refract: cleanup server call constants
This commit is contained in:
@@ -1,14 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { NODE_PORT } from '../api/apiConstants';
|
||||
|
||||
// get origin from URL
|
||||
const serverURL = window.location.origin.replace(
|
||||
window.location.port,
|
||||
`${NODE_PORT}/`
|
||||
);
|
||||
|
||||
export const eventsNamespace = 'events';
|
||||
export const eventsURL = serverURL + eventsNamespace;
|
||||
import { eventsURL } from '../api/apiConstants';
|
||||
|
||||
export const fetchAllEvents = async () => {
|
||||
const res = await axios.get(eventsURL);
|
||||
|
||||
Reference in New Issue
Block a user