feat: login & registration; enhanced paste view; custom dropdown + search; navbar; global user access via store; auto token refresh; paste creation as user; /api/user/me, returns info on yourself including pastes;

fix: auth check
refactor: remove user UID api endpoint
This commit is contained in:
2025-12-28 13:54:01 -05:00
parent b9b14a3d5a
commit db1d8704a1
38 changed files with 1334 additions and 103 deletions
@@ -1,5 +1,6 @@
import type { PageServerLoad } from './$types';
import { getShiki } from '$lib/shiki';
import type { Paste } from '$lib/types/paste';
import { getShiki } from '$lib/server/shiki';
export const load: PageServerLoad = async ({ params, fetch }) => {
const { id } = params;
@@ -11,7 +12,7 @@ export const load: PageServerLoad = async ({ params, fetch }) => {
error: { message: 'Paste not found' }
};
}
const pasteData = await paste.json();
const pasteData = (await paste.json()) as Paste;
const pasteContent = await fetch(`/api/paste/raw/${id}`);
const pasteOptions = await fetch('/api/paste/create/options');
const options = await pasteOptions.json();