perbaikan service device
This commit is contained in:
parent
f36c8d0240
commit
f04515fb41
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue