diff --git a/src/environments/base.js b/src/environments/base.js index 16424b3..3c3bb21 100755 --- a/src/environments/base.js +++ b/src/environments/base.js @@ -6,9 +6,9 @@ export default function(baseApi) { return { api: { - shows: `${baseApi}/shows/{showId}`, - episodes: `${baseApi}/shows/{showId}/episodes`, - cast: `${baseApi}/shows/{showId}/cast`, + shows: `${baseApi}/shows/:showId`, + episodes: `${baseApi}/shows/:showId/episodes`, + cast: `${baseApi}/shows/:showId/cast`, }, isProduction: true, isDevelopment: false, diff --git a/src/stores/shows/ShowsEffect.js b/src/stores/shows/ShowsEffect.js index 5b34814..413aeaf 100644 --- a/src/stores/shows/ShowsEffect.js +++ b/src/stores/shows/ShowsEffect.js @@ -8,19 +8,19 @@ import EffectUtility from '../../utilities/EffectUtility'; export default class ShowsEffect { static async requestShow(showId) { - const endpoint = environment.api.shows.replace('{showId}', showId); + const endpoint = environment.api.shows.replace(':showId', showId); return EffectUtility.getToModel(ShowModel, endpoint); } static async requestEpisodes(showId) { - const endpoint = environment.api.episodes.replace('{showId}', showId); + const endpoint = environment.api.episodes.replace(':showId', showId); return EffectUtility.getToModel(EpisodeModel, endpoint); } static async requestCast(showId) { - const endpoint = environment.api.cast.replace('{showId}', showId); + const endpoint = environment.api.cast.replace(':showId', showId); // Below is just to show you what the above "requestEpisodes" method is doing with "HttpUtility.getToModel". // In your application you can change this to match the "requestEpisodes" method.