mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
feat: enhance user experience with tooltips; implement return URL handling on login and registration; add user roles; improve paste visibility checks
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type { PageServerLoad } from './$types';
|
||||
import { getServerToken } from '$lib/utils/auth';
|
||||
import type { User } from '$lib/types/user';
|
||||
|
||||
export const load: PageServerLoad = async ({ params, fetch, cookies }) => {
|
||||
const { username } = params;
|
||||
@@ -9,6 +10,7 @@ export const load: PageServerLoad = async ({ params, fetch, cookies }) => {
|
||||
Authorization: token ? `Bearer ${token}` : ''
|
||||
}
|
||||
});
|
||||
const user = await res.json();
|
||||
|
||||
const user = await res.json() as User;
|
||||
return { user };
|
||||
}
|
||||
Reference in New Issue
Block a user