This commit is contained in:
Bastian Wagner
2024-10-18 16:52:58 +02:00
parent ed6b2b9c45
commit 76e54cfaa0
32 changed files with 552 additions and 7 deletions

View File

@@ -2,6 +2,7 @@ import { HttpClient } from '@angular/common/http';
import { inject, Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { IUser } from '../model/interface/user.interface';
import { IKey } from '../model/interface/key.interface';
@Injectable({
providedIn: 'root'
@@ -23,4 +24,22 @@ export class ApiService {
getRoles(): Observable<{id: string, name: string}[]> {
return this.http.get<{id: string, name: string}[]>('/api/role');
}
getKeys(): Observable<IKey[]> {
return this.http.get<IKey[]>('api/key')
}
updateKey(key: IKey): Observable<IKey> {
return this.http.put<IKey>('api/key', key);
}
getCylinders(): Observable<any[]> {
return this.http.get<any[]>('api/key/cylinder');
}
postKey(key: IKey) {}
postKeySystem(keySystem: any) {
return this.http.post('api/key/system', keySystem);
}
}