This commit is contained in:
cv
2021-04-12 12:50:49 +02:00
parent c40675a62d
commit f0cb09346d
5 changed files with 55 additions and 81 deletions
+8 -6
View File
@@ -1,27 +1,29 @@
import axios from 'axios';
import { serverURL } from './apiConstants';
const playbackURL = serverURL + 'playback/';
export const playbackNamespace = 'playback';
const playbackURL = serverURL + playbackNamespace;
export const getStart = async () => {
const res = await fetch(playbackURL + 'start');
const res = await axios.get(playbackURL + '/start');
return res;
};
export const getPause = async () => {
const res = await fetch(playbackURL + 'pause');
const res = axios.get(playbackURL + '/pause');
return res;
};
export const getRoll = async () => {
const res = await fetch(playbackURL + 'roll');
const res = axios.get(playbackURL + '/roll');
return res;
};
export const getPrevious = async () => {
const res = await fetch(playbackURL + 'previous');
const res = axios.get(playbackURL + '/previous');
return res;
};
export const getNext = async () => {
const res = await fetch(playbackURL + 'next');
const res = axios.get(playbackURL + '/next');
return res;
};