keys
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user