Get the jump type only for the tunnel

This commit is contained in:
Sébastien ANDRE
2023-08-22 18:26:49 +02:00
parent 5199f746c3
commit bf05e1c668
4 changed files with 37 additions and 27 deletions

View File

@@ -14,11 +14,16 @@ export class JumpTypeService extends BaseService {
super();
}
public getListOfJumpTypes(): Observable<Array<JumpTypeResp>> {
let callToApi = this.http.get<Array<JumpTypeResp>>(`${this.apiUrl}/JumpType`, { headers: this.headers });
public getListOfJumpTypes(onlyTunnel: boolean = false): Observable<Array<JumpTypeResp>> {
let callToApi = this.http.get<Array<JumpTypeResp>>(`${this.apiUrl}/JumpType${onlyTunnel ? "/tunnel" : ""}`, { headers: this.headers });
return this.serviceCacheApi.get<Array<JumpTypeResp>>(CacheApiKey.JumpType, callToApi);
}
public getListOfJumpTypesForTunnel(): Observable<Array<JumpTypeResp>> {
let callToApi = this.http.get<Array<JumpTypeResp>>(`${this.apiUrl}/JumpType/tunnel`, { headers: this.headers });
return this.serviceCacheApi.get<Array<JumpTypeResp>>(CacheApiKey.TunnelJumpType, callToApi);
}
public addJumpType(jumptypetName: string) {
const bodyJumpType: JumpTypeReq = {
id: 0,