perbaikan service device

This commit is contained in:
Fuzi_fauzia 2024-06-25 22:14:32 +07:00
parent f36c8d0240
commit f04515fb41
1 changed files with 4 additions and 4 deletions

View File

@ -10,14 +10,14 @@ const BASE_URL = 'https://kapi.absys.ninja/hemat';
export class DeviceService { export class DeviceService {
constructor(private http: HttpClient) {} constructor(private http: HttpClient) {}
getDeviceData(id, category = "0", status = "0"): Observable<any> { getDeviceData(id, category, status): Observable<any> {
const endpoint = `/devices`; const endpoint = `/devices`;
const params = new URLSearchParams({ const params = new URLSearchParams({
page: "1", page: "1",
limit: "100", limit: "100",
building_id: id, building_id: id ? id : "0",
category_id: category, category_id: category ? category : "0",
status_id: status, status_id: status ? status : "0",
room_id: "0" room_id: "0"
}); });
// if (category) { // if (category) {