api/queryAPI.js
// get all the episodes for the show
get all the episodes for the show
get all the episodes for the show
async function queryEpisodes({ name, page = null }) {
  if (page) {
    page = page.toString();
  }
  let response = await api.getEpisodes({ showName: name, page }).catch();
  let validStatus = await validResponse(response, queryEpisodes, name).catch();
  if (validStatus === true) {
    return response;
  }
}
async function queryEpisodes ( { name , page = null } ) { if ( page ) { page = page . toString ( ) ; } let response = await api . getEpisodes ( { showName : name , page } ) . catch ( ) ; let validStatus = await validResponse ( response , queryEpisodes , name ) . catch ( ) ; if ( validStatus === true ) { return response ; } }
get all the episodes for the show
get all the episodes for the show