diff options
author | wlodekm <[email protected]> | 2024-11-10 21:03:01 +0200 |
---|---|---|
committer | wlodekm <[email protected]> | 2024-11-10 21:03:01 +0200 |
commit | a2cab186316b4c46839cb5f9ad51b693edb194f6 (patch) | |
tree | df2b39edddbb5aaedb542e4a24b8e7b5a58f58b3 /v2/client.ts | |
parent | 91b3570414cfdb4d4751e28006bf373d626d372a (diff) |
add build script, possibly fix a bug ( v1.0.1 )
Diffstat (limited to 'v2/client.ts')
-rw-r--r-- | v2/client.ts | 4 |
1 files changed, 3 insertions, 1 deletions
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: { |