function addSuggestedWorkout(id, callback) {
  return function(dispatch) {
    return fetch(`/api/workouts/${id}`, {
      method: 'PATCH',
      headers: {
        'Content-type': 'application/json'
      },
      body: JSON.stringify({ suggested: false })
    })
      .then(resp => {
        dispatch({type: 'DELETE_WORKOUT', id: parseInt(id)})
      })
      .then(callback())
  }
}
// Modifies the suggested attribute on the selected workout
Modifies the suggested attribute on the selected workout
Modifies the suggested attribute on the selected workout
function addSuggestedWorkout(id, callback) {
  return function(dispatch) {
    return fetch(`/api/workouts/${id}`, {
      method: 'PATCH',
      headers: {
        'Content-type': 'application/json'
      },
      body: JSON.stringify({ suggested: false })
    })
      .then(resp => {
        dispatch({type: 'DELETE_WORKOUT', id: parseInt(id)})
      })
      .then(callback())
  }
}
function addSuggestedWorkout ( id , callback ) { return function ( dispatch ) { return fetch ( ` ${ id } ` , { method : 'PATCH' , headers : { 'Content-type' : 'application/json' } , body : JSON . stringify ( { suggested : false } ) } ) . then ( resp => { dispatch ( { type : 'DELETE_WORKOUT' , id : parseInt ( id ) } ) } ) . then ( callback ( ) ) } }
Modifies the suggested attribute on the selected workout
Modifies the suggested attribute on the selected workout