integrasi building detail

This commit is contained in:
2024-05-28 16:24:27 +07:00
parent ded0ca21a1
commit eaea625b4b
7 changed files with 856 additions and 820 deletions

View File

@@ -26,6 +26,15 @@ export class BuildingService {
return this.http.get<any>(url, { headers });
}
listDevicePerBuilding(id): Observable<any> {
const url = `https://kapi.absys.ninja/hemat/devices/aggregate/on?building_id=${id}`;
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');