mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
chore: npm run format + lint
This commit is contained in:
@@ -3,14 +3,14 @@ import { getServerToken } from '$lib/utils/auth';
|
||||
import type { User } from '$lib/types/user';
|
||||
|
||||
export const load: PageServerLoad = async ({ params, fetch, cookies }) => {
|
||||
const { username } = params;
|
||||
const token = getServerToken(cookies);
|
||||
const res = await fetch(`/api/user/${username}`, {
|
||||
headers: {
|
||||
Authorization: token ? `Bearer ${token}` : ''
|
||||
}
|
||||
});
|
||||
|
||||
const user = await res.json() as User;
|
||||
return { user };
|
||||
}
|
||||
const { username } = params;
|
||||
const token = getServerToken(cookies);
|
||||
const res = await fetch(`/api/user/${username}`, {
|
||||
headers: {
|
||||
Authorization: token ? `Bearer ${token}` : ''
|
||||
}
|
||||
});
|
||||
|
||||
const user = (await res.json()) as User;
|
||||
return { user };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user