diff --git a/src/api.ts b/src/api.ts index 267fef0..47eef50 100644 --- a/src/api.ts +++ b/src/api.ts @@ -106,7 +106,6 @@ export function getShowplan(showId: number): Promise { "GET", {} ).then(res => { - console.log(res); return Object.keys(res).map(x => res[x]); }); } @@ -214,17 +213,16 @@ export function updateShowplan( export interface Timeslot { timeslotid: number, - time: number, - timeStr: string - + starttime: number, + starttimeStr: string, + title: string } -export function getCurrentAPITimeslot(): Promise { +export function getCurrentApiTimeslot(): Promise { return myradioApiRequest(`/timeslot/userselectedtimeslot`, "GET", {} ).then(res => { - console.log(res); return res; }); }; @@ -236,15 +234,13 @@ export interface User { sname: string, url: string, photo: string - } -export function getCurrentAPIUser(): Promise { +export function getCurrentApiUser(): Promise { return myradioApiRequest(`/user/currentuser`, "GET", {} ).then(res => { - console.log(res); return res; }); }; diff --git a/src/broadcast/state.ts b/src/broadcast/state.ts index 0ee5a4e..9fe2bd2 100644 --- a/src/broadcast/state.ts +++ b/src/broadcast/state.ts @@ -48,15 +48,15 @@ export const toggleTracklisting = (): AppThunk => dispatch => { }; export const tracklistStart = (player: number, trackid: number): AppThunk =>async (dispatch, getState) => { - console.log("Attempting to tracklist: " + trackid); if (getState().broadcast.tracklisting) { + console.log("Attempting to tracklist: " + trackid); getState().mixer.players[player].tracklistItemID = (await sendTracklistStart(trackid)).audiologid; } }; export const tracklistEnd = (tracklistitemid: number): AppThunk => async (dispatch, getState) => { - console.log("Attempting to end tracklistitem: " + tracklistitemid); if (getState().broadcast.tracklisting) { + console.log("Attempting to end tracklistitem: " + tracklistitemid); myradioApiRequest("/tracklistItem/" + tracklistitemid + "/endtime", "PUT", {}); } };