integrasi building list dan room list
This commit is contained in:
@@ -17,6 +17,15 @@ export class BuildingService {
|
||||
return this.http.post<any>(url, data, { headers });
|
||||
}
|
||||
|
||||
listBuilding(): Observable<any> {
|
||||
const url = `https://kapi.absys.ninja/hemat/building/dashboard/list`;
|
||||
const headers = new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
'x-api-key': 'j2yaYvPSQcsEEmHh3NEobfiXyyXmmnHT'
|
||||
});
|
||||
return this.http.get<any>(url, { headers });
|
||||
}
|
||||
|
||||
getBuildingData(page: number = 1, limit: number = 10): Observable<any> {
|
||||
const url = `https://kapi.absys.ninja/hemat/building?page=${page}&limit=${limit}`;
|
||||
// const headers = new HttpHeaders().set('Content-Type', 'application/json');
|
||||
@@ -27,6 +36,15 @@ export class BuildingService {
|
||||
return this.http.get<any>(url, { headers });
|
||||
}
|
||||
|
||||
getRoomByBuildingId(buildingId: any): Observable<any> {
|
||||
const url = `https://kapi.absys.ninja/hemat/room-building/list/byIds?buildingId=${buildingId}`;
|
||||
const headers = new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
'x-api-key': 'j2yaYvPSQcsEEmHh3NEobfiXyyXmmnHT'
|
||||
});
|
||||
return this.http.get<any>(url, { headers });
|
||||
}
|
||||
|
||||
getDeviceData(page: number = 1, limit: number = 10): Observable<any> {
|
||||
const url = `https://kapi.absys.ninja/hemat/devices?page=${page}&limit=${limit}`;
|
||||
const headers = new HttpHeaders({
|
||||
|
||||
Reference in New Issue
Block a user