xxx
This commit is contained in:
@@ -3,6 +3,7 @@ import { inject, Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { IUser } from '../model/interface/user.interface';
|
||||
import { IKey } from '../model/interface/key.interface';
|
||||
import { ICylinder } from '../model/interface/cylinder.interface';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -37,8 +38,12 @@ export class ApiService {
|
||||
return this.http.post<IKey>('api/key', key);
|
||||
}
|
||||
|
||||
postKeySystem(keySystem: any) {
|
||||
return this.http.post('api/key/system', keySystem);
|
||||
createSystem(keySystem: any) {
|
||||
return this.http.post('api/system', keySystem);
|
||||
}
|
||||
|
||||
getSystems(): Observable<any[]> {
|
||||
return this.http.get<any[]>('api/system');
|
||||
}
|
||||
|
||||
handoverKey(data: any) {
|
||||
@@ -69,7 +74,11 @@ export class ApiService {
|
||||
return this.http.put(`api/key/${id}/restore`, null);
|
||||
}
|
||||
|
||||
getCylinders(): Observable<any[]> {
|
||||
return this.http.get<any[]>('api/cylinder');
|
||||
getCylinders(): Observable<ICylinder[]> {
|
||||
return this.http.get<ICylinder[]>('api/cylinder');
|
||||
}
|
||||
|
||||
deleteCylinder(cylinder: ICylinder): Observable<any> {
|
||||
return this.http.delete(`api/cylinder/${cylinder.id}`)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user