/** * @copyright 2026 NHCarrigan * @license Naomi's Public License * @author Naomi Carrigan */ import { Injectable, inject } from '@angular/core'; import { Observable } from 'rxjs'; import { ApiService } from './api.service'; import { Show, CreateShowDto, UpdateShowDto } from '@library/shared-types'; @Injectable({ providedIn: 'root' }) export class ShowsService { private api = inject(ApiService); getAllShows(): Observable { return this.api.get('/shows'); } getShowById(id: string): Observable { return this.api.get(`/shows/${id}`); } createShow(show: CreateShowDto): Observable { return this.api.post('/shows', show); } updateShow(id: string, show: UpdateShowDto): Observable { return this.api.put(`/shows/${id}`, show); } deleteShow(id: string): Observable<{ success: boolean }> { return this.api.delete<{ success: boolean }>(`/shows/${id}`); } }