This commit is contained in:
Yusur 2025-09-14 16:05:35 +02:00
parent 155aa524f3
commit 244f7e40ce
2 changed files with 6 additions and 4 deletions

View file

@ -6,8 +6,10 @@ import type { LoadEvent } from '@sveltejs/kit';
async function loadFeed (event: LoadEvent): Promise<PostEntry[] | null> {
const resp = await backend.withEvent(event).fetch('home/feed');
if ([200].indexOf(resp.status) < 0) return null;
if ([200].indexOf(resp.status) < 0) {
console.error(`fetch feed returned status ${resp.status}`);
return null;
}
try {
const respJ = await resp.json();