Load applications from api.

This commit is contained in:
2021-08-01 17:29:42 +02:00
parent 0d9340f220
commit 30d336fed9
9 changed files with 60 additions and 11 deletions

View File

@@ -11,6 +11,10 @@ export class ApplicationService {
private _httpClient: HttpClient
) {}
getAll(): Promise<Application[]> {
return this._httpClient.get<Application[]>('/api/applications').toPromise();
}
add(application: Application): Promise<Application> {
return this._httpClient.post<Application>('/api/applications', application).toPromise();
}