summary refs log tree commit diff
path: root/index.js
diff options
context:
space:
mode:
authorwlodekm <[email protected]>2024-11-10 20:07:33 +0200
committerwlodekm <[email protected]>2024-11-10 20:07:33 +0200
commit91b3570414cfdb4d4751e28006bf373d626d372a (patch)
treebaee5103f682977074b0e0c71f890fddf912df89 /index.js
parent276b4f6553c8e14537899f75c0a60b11d14f148d (diff)
ok v1.0
Diffstat (limited to 'index.js')
-rw-r--r--index.js40
1 files changed, 0 insertions, 40 deletions
diff --git a/index.js b/index.js
deleted file mode 100644
index fd9ead0..0000000
--- a/index.js
+++ /dev/null
@@ -1,40 +0,0 @@
-import * as readline from 'node:readline/promises';
-import { stdin as input, stdout as output } from 'node:process';
-
-const rl = readline.createInterface({ input, output });
-
-const username = await rl.question('Username: ');
-const password = await rl.question('Password: ');
-
-console.log("logging in as %s", username)
-
-const authr = await (await fetch("https://api.meower.org/auth/login", {
-    method: "POST",
-    headers: {
-        "content-type": "application/json"
-    },
-    body: JSON.stringify({
-        username,
-        password
-    })
-})).json();
-let token = authr.token
-
-console.log('got token', token)
-
-rl.addListener('line', async (i) => {
-    await fetch("https://api.meower.org/home", {
-        method: "POST",
-        headers: {
-            "content-type": "application/json",
-            token
-        },
-        body: JSON.stringify({
-            content: i
-        })
-    })
-    // console.log("sent")
-    rl.prompt("> ")
-})
-
-rl.prompt("> ")
\ No newline at end of file