feature/backend-rewrite #2

Open
kamil wants to merge 236 commits from feature/backend-rewrite into main
2 changed files with 2 additions and 2 deletions
Showing only changes of commit e11e866e27 - Show all commits

View File

@@ -104,7 +104,7 @@ export const GET: RequestHandler = async ({ params, url, locals }) => {
const res = await fetch(presignUrl);
if (!res.ok) throw new Error(`MinIO returned ${res.status}`);
const markdown = await res.text();
html = await marked(markdown, { async: true });
html = marked(markdown) as string;
} catch (e) {
log.error('api/chapter', 'failed to fetch chapter content', { slug, n, err: String(e) });
}

View File

@@ -114,7 +114,7 @@ export const load: PageServerLoad = async ({ params, url, locals }) => {
const res = await fetch(presignUrl);
if (!res.ok) throw new Error(`MinIO returned ${res.status}`);
const markdown = await res.text();
html = await marked(markdown, { async: true });
html = marked(markdown) as string;
} catch (e) {
// Don't hard-fail — show empty content with error message
log.error('chapter', 'failed to fetch chapter content', { slug, n, err: String(e) });