mirror of
https://github.com/bendtherules/mispair-demo.git
synced 2026-08-18 13:22:17 +00:00
Init file
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
async function fetchTemperature(zoneId) {
|
||||
const res = await fetch(`/api/v1/zones/${zoneId}/primary/temperature`);
|
||||
return res.json();
|
||||
}
|
||||
|
||||
// Don't change this function signature
|
||||
export async function attachChart(chartInstance, zoneId) {
|
||||
await fetchTemperature(zoneId).then(temp => {
|
||||
chartInstance.update(temp);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user