WIP: Implement frontend

This commit is contained in:
Simon Grimme
2022-07-21 00:29:00 +02:00
parent 6b89690180
commit cc1e02a1ca
109 changed files with 22662 additions and 670 deletions
@@ -0,0 +1,24 @@
import {Injectable} from '@angular/core';
import {GamesApi} from "../api/GamesApi";
import {HttpClient} from "@angular/common/http";
import {Observable} from "rxjs";
import {DetectedGameDto} from "../models/dtos/DetectedGameDto";
@Injectable({
providedIn: 'root'
})
export class GamesService implements GamesApi {
private readonly apiPath = '/games';
constructor(private http: HttpClient) {
}
getAllGames(): Observable<DetectedGameDto[]> {
return this.http.get<DetectedGameDto[]>(this.apiPath);
}
getAllGameMappings(): Observable<Map<string, string>> {
return this.http.get<Map<string, string>>(`${this.apiPath}/game-mappings`);
}
}