diff --git a/src/services/shows/shows-api.service.ts b/src/services/shows/shows-api.service.ts index 31235a6..c8c91d9 100644 --- a/src/services/shows/shows-api.service.ts +++ b/src/services/shows/shows-api.service.ts @@ -14,10 +14,12 @@ export class ShowsApiService { private readonly url: string = "https://shows.everest.tailscale/api/"; private showsEndpoint: string + private idEndpoint: string private http: HttpClient = inject(HttpClient); constructor() { this.showsEndpoint = this.url + "shows/" + this.idEndpoint = this.showsEndpoint + "id/" } getShows(): Observable { @@ -25,7 +27,7 @@ export class ShowsApiService { } getShow(id: string): Observable { - return this.http.get(this.showsEndpoint + "id/" + id) + return this.http.get(this.idEndpoint + id) } sendShow(newShow: Show): Observable { @@ -33,10 +35,10 @@ export class ShowsApiService { } deleteShw(id: string): Observable { - return this.http.delete(this.showsEndpoint + "id/" + id) + return this.http.delete(this.idEndpoint + id) } updateShow(show: Show): Observable { - return this.http.put(this.showsEndpoint + "id/" + show._id, show) + return this.http.put(this.idEndpoint + show._id, show) } }