First comit

This commit is contained in:
Johan
2025-12-17 09:56:42 +01:00
commit f8979701ae
43 changed files with 11907 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import { inject, Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { environment } from '../../../environments/environment';
import { Genre } from '../models/api.models';
@Injectable({ providedIn: 'root' })
export class GenreApiService {
private readonly http = inject(HttpClient);
private readonly apiUrl = `${environment.apiRestUrl}/genres`;
getGenres(): Observable<Genre[]> {
return this.http.get<Genre[]>(this.apiUrl);
}
}