From 70e637b281ae060e40ceb6e312591276d1c68540 Mon Sep 17 00:00:00 2001 From: whoswhip Date: Sat, 25 Apr 2026 03:12:12 -0400 Subject: [PATCH] feat: add /@username redirect to /user/username --- SharpbinV3.Client/src/routes/@[username]/+server.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 SharpbinV3.Client/src/routes/@[username]/+server.ts diff --git a/SharpbinV3.Client/src/routes/@[username]/+server.ts b/SharpbinV3.Client/src/routes/@[username]/+server.ts new file mode 100644 index 0000000..217b499 --- /dev/null +++ b/SharpbinV3.Client/src/routes/@[username]/+server.ts @@ -0,0 +1,7 @@ +import { error, redirect } from '@sveltejs/kit'; + +export async function GET({ params }) { + const username = params?.username; + if (!username) throw error(404, 'User not found'); + throw redirect(302, `/user/${encodeURIComponent(username)}`); +}