update
Some checks failed
deploy / deploy (push) Has been cancelled

This commit is contained in:
toom1996
2026-09-02 21:50:30 +08:00
parent 50e5775dc8
commit 64af75c0a9
23 changed files with 1730 additions and 285 deletions

21
_tmp_dbg.mjs Normal file
View File

@ -0,0 +1,21 @@
const BASE = "http://localhost:8090";
const login = await (await fetch(BASE + "/api/v1/auth/login", {
method: "POST", headers: { "Content-Type": "application/json" },
body: JSON.stringify({ account: "root", password: "root" }),
})).json();
const tok = login.access_token;
async function raw(method, path, body) {
const res = await fetch(BASE + path, {
method, headers: { "Content-Type": "application/json", Authorization: "Bearer " + tok },
body: body ? JSON.stringify(body) : undefined,
});
const text = await res.text();
console.log(method, path, "=>", res.status, text.slice(0, 200));
}
await raw("POST", "/api/v1/auth/favorites", { target_type: "runway", target_uid: "r0042h1mx", title: "t", cover: "c", brand: "b" });
await raw("POST", "/api/v1/auth/history", { target_uid: "r0042h1mx" });
await raw("POST", "/api/v1/auth/history", { target_uid: "r0042h1mx", extra: 1 });
await raw("POST", "/api/v1/auth/history", JSON.stringify({ target_uid: "r0042h1mx" }));
process.exit(0);