diff options
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: { |