diff --git a/src/app/content/hemat-app/service/device.service.ts b/src/app/content/hemat-app/service/device.service.ts index be4ec8e..c963a4b 100644 --- a/src/app/content/hemat-app/service/device.service.ts +++ b/src/app/content/hemat-app/service/device.service.ts @@ -10,14 +10,14 @@ const BASE_URL = 'https://kapi.absys.ninja/hemat'; export class DeviceService { constructor(private http: HttpClient) {} - getDeviceData(id, category = "0", status = "0"): Observable { + getDeviceData(id, category, status): Observable { const endpoint = `/devices`; const params = new URLSearchParams({ page: "1", limit: "100", - building_id: id, - category_id: category, - status_id: status, + building_id: id ? id : "0", + category_id: category ? category : "0", + status_id: status ? status : "0", room_id: "0" }); // if (category) {