Services: create and move shows-api service

This commit is contained in:
Toast 2025-01-28 12:03:53 +01:00
parent 46b267d672
commit 0a6fda1512
3 changed files with 3 additions and 3 deletions

View file

@ -1,22 +0,0 @@
import {inject, Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {Observable} from 'rxjs';
import {ShowsApiResponse} from './shows-api';
@Injectable({
providedIn: 'root'
})
export class ShowsApiService {
private readonly url: string = "https://shows.everest.tailscale/api/";
private showsEndpoint: string
private http: HttpClient = inject(HttpClient);
constructor() {
this.showsEndpoint = this.url + "shows/"
}
getShows(): Observable<ShowsApiResponse> {
return this.http.get<ShowsApiResponse>(this.showsEndpoint)
}
}