From f04515fb41015d4f0e802bfa20f36c7a314960cd Mon Sep 17 00:00:00 2001 From: Fuzi_fauzia Date: Tue, 25 Jun 2024 22:14:32 +0700 Subject: [PATCH] perbaikan service device --- src/app/content/hemat-app/service/device.service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) {