diff --git a/client/src/actions/index.js b/client/src/actions/index.js index 2c1691b..ccf8b8a 100644 --- a/client/src/actions/index.js +++ b/client/src/actions/index.js @@ -38,6 +38,8 @@ export const addSeries = params => async dispatch => { dispatch({type: types.CURRENT_SHOW, payload: params.showName}); const res = await axios.get('/api/sonarr/series/add', {params}); dispatch({type: types.SET_LOADING, payload: false}); - toast(res.data); + res.data.title + ? toast('Successfully added: ' + res.data.title) + : toast(res.data); dispatch({type: types.ADD_SERIES, payload: res.data}); }; diff --git a/server/services/sonarr/sonarrApi.js b/server/services/sonarr/sonarrApi.js index 3eb48fa..ff7b908 100644 --- a/server/services/sonarr/sonarrApi.js +++ b/server/services/sonarr/sonarrApi.js @@ -35,10 +35,8 @@ const addSeries = async (showName, user) => { json: true, }; - // const res = await request.post(params); - // return res; - console.log('mike--', body.title); - return body.title; + const res = await request.post(params); + return res; } catch (error) { console.log(error); return error.errorMessage;