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)}`); +}