initial commit

This commit is contained in:
Yusur 2025-09-12 19:20:30 +02:00
commit 155aa524f3
48 changed files with 3943 additions and 0 deletions

View file

@ -0,0 +1,28 @@
import { backend } from '$lib/backend';
import { error, redirect } from '@sveltejs/kit';
export async function load(event) {
const { params } = event;
const { id } = params;
const resp = await backend.withEvent(event).fetch('user/' + encodeURIComponent(id));
if(resp.status === 404) {
error(404);
}
const respJ = await resp.json();
let { users } = respJ;
console.log(users);
if (users[id]) {
if (users[id].username) {
redirect(302, "/@" +users[id].username );
}
}
error(404);
}