forked from Blendman974/faceclaw
Merge branch 'main' of https://github.com/jimrandomh/faceclaw into microphone-fixes
This commit is contained in:
commit
80f16c0cd6
40 files changed
+975
-160
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { nightscoutApiTokenSetting, nightscoutSiteUrlSetting } from "../ui/dashboard-settings";
|
||||
import { fetchWithUserAgent } from "../util/http";
|
||||
import { fetchTextWithUserAgent } from "../util/http";
|
||||
|
||||
export type NightscoutPoint = {
|
||||
timestampMs: number;
|
||||
@@ -305,11 +305,11 @@ export class NightscoutBridge {
|
||||
}
|
||||
|
||||
async function fetchJson<T>(url: string): Promise<T> {
|
||||
const response = await fetchWithUserAgent(url);
|
||||
const response = await fetchTextWithUserAgent(url);
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP ${response.status}`);
|
||||
}
|
||||
return (await response.json()) as T;
|
||||
return response.json<T>();
|
||||
}
|
||||
|
||||
function parseTreatments(treatments: NightscoutTreatmentResponse[], nowMs: number): {
|
||||
|
||||
Reference in new issue
Block a user