1
0
mirror of https://github.com/mgerb/go-discord-bot synced 2026-01-11 17:42:48 +00:00

add upload history to stats UI

This commit is contained in:
2018-10-20 13:53:02 -05:00
parent b004d4f29a
commit 81ecacd3d4
15 changed files with 149 additions and 7 deletions

View File

@@ -1,10 +1,17 @@
import { SoundType } from '../components/sound-list/sound-list';
import { ISound } from '../model';
import { axios } from './axios.service';
const playSound = (sound: SoundType): Promise<any> => {
return axios.post('/api/sound/play', { name: sound.name });
};
const getSounds = async (): Promise<ISound[]> => {
const res = await axios.get('/api/sound');
return res.data.data;
};
export const SoundService = {
getSounds,
playSound,
};