From a2cab186316b4c46839cb5f9ad51b693edb194f6 Mon Sep 17 00:00:00 2001 From: wlodekm Date: Sun, 10 Nov 2024 21:03:01 +0200 Subject: add build script, possibly fix a bug ( v1.0.1 ) --- v2/client.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'v2/client.ts') diff --git a/v2/client.ts b/v2/client.ts index 6eb9523..16358c8 100644 --- a/v2/client.ts +++ b/v2/client.ts @@ -34,7 +34,7 @@ export async function login(username: string, password: string) { const data = JSON.parse(ev.data.toString()); screen.logs.push("INC: " + JSON.stringify(data)) if(data.cmd != "post") return; - home.push(data.val) + home.push(data.val); const textHome: string[] = home.map(p => `[${strftime("%H:%M:%S")}] ${p.u}: ${p.p}`); const homeElem: Text = screen.elements.get("home") as Text; homeElem.text = textHome.join("\n")+"\n"; @@ -47,10 +47,12 @@ export async function loadHome(screen: Screen) { const textHome: string[] = home.map(p => `[${strftime("%H:%M:%S")}] ${p.u}: ${p.p}`); const homeElem: Text = screen.elements.get("home") as Text; homeElem.text = textHome.join("\n")+"\n"; + screen.logs.push("loadHome ran", home.length.toString()) screen.render() } export async function sendHome(post:string) { + screen.logs.push("sendHome ran", home.length.toString()) fetch("https://api.meower.org/home", { method: "POST", headers: { -- cgit 1.4.1-2-gfad0