fix: remove non-existent created field from auth/me and fix html declaration order in chapter page
Some checks failed
Deploy / Deploy Production (push) Has been skipped
Deploy / Cleanup Preview (push) Has been skipped
Deploy / Deploy Preview (push) Failing after 1s
CI / Scraper / Lint (pull_request) Failing after 17s
CI / UI / Build (pull_request) Successful in 25s
CI / Scraper / Test (pull_request) Successful in 27s
CI / Scraper / Build (pull_request) Has been skipped
iOS CI / Build (pull_request) Failing after 1s
iOS CI / Test (pull_request) Has been skipped

This commit is contained in:
Admin
2026-03-08 22:28:08 +05:00
parent ce3eef1298
commit 5a7d7ce3b9
2 changed files with 5 additions and 6 deletions

View File

@@ -13,7 +13,6 @@ export const GET: RequestHandler = async ({ locals }) => {
return json({ return json({
id: locals.user.id, id: locals.user.id,
username: locals.user.username, username: locals.user.username,
role: locals.user.role, role: locals.user.role
created: locals.user.created ?? ''
}); });
}; };

View File

@@ -6,6 +6,10 @@
let { data }: { data: PageData } = $props(); let { data }: { data: PageData } = $props();
let html = $state(data.html);
let fetchingContent = $state(!data.isPreview && !data.html);
let fetchError = $state('');
// ── Word count ──────────────────────────────────────────────────────────── // ── Word count ────────────────────────────────────────────────────────────
function countWords(htmlStr: string | null): number { function countWords(htmlStr: string | null): number {
if (!htmlStr) return 0; if (!htmlStr) return 0;
@@ -15,10 +19,6 @@
const wordCount = $derived(countWords(html)); const wordCount = $derived(countWords(html));
let html = $state(data.html);
let fetchingContent = $state(!data.isPreview && !data.html);
let fetchError = $state('');
onMount(async () => { onMount(async () => {
// Record reading progress (skip for preview chapters) // Record reading progress (skip for preview chapters)
if (!data.isPreview) { if (!data.isPreview) {