mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user