This commit is contained in:
BOTAlex 2025-10-06 15:36:31 +02:00
parent db11d96328
commit 47cea68e04

View file

@ -2,14 +2,14 @@ import { parseProfile, type Profile } from "./Profile";
class Redactor { class Redactor {
async TryGetUnredacter(): Promise<Profile> { async TryGetUnredacter(): Promise<Profile> {
const key = localStorage.getItem("key"); const storedKey = localStorage.getItem("key");
if (!key) throw new Error("Missing key"); if (!storedKey) throw new Error("Missing key");
const hashResJson = await ( const hashResJson = await (
await fetch("http://api.deprived.dev/unredact", { await fetch("http://api.deprived.dev/unredact", {
method: "POST", method: "POST",
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
body: JSON.stringify({ key: "balls" }), body: JSON.stringify({ key: storedKey }),
}) })
).json(); ).json();