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