redacted linkedin
All checks were successful
Rebuild signaller for deprived.dev to rebuild site / test_service (push) Successful in 15s

This commit is contained in:
BOTAlex 2025-10-09 06:33:16 +02:00
parent c1c3090a2f
commit 2094b85e69
4 changed files with 33 additions and 19 deletions

View file

@ -2,6 +2,7 @@
import { z } from "zod";
const Link = z.object({
imageId: z.string().min(1).optional(),
text: z.string().min(1),
link: z.string().url(),
});

View file

@ -40,8 +40,11 @@ class Redactor implements Readable<Profile | undefined> {
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
this.unredactedProfile = parseProfile(data.json);
let data = await res.json();
const replaced = JSON.parse(
JSON.stringify(data).replaceAll("[PB]", env.POCKETBASE_URL),
);
this.unredactedProfile = parseProfile(replaced.json);
this.notify(); // <-- tell Svelte to update
return this.unredactedProfile;
}