Logo
Explore Help
Register Sign In
valknar/sexy
1
0
Fork 0
You've already forked sexy
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
18116072c92097f020832ea222fdc7fa4e2041ca
sexy/packages/frontend/src/routes/+page.server.ts

8 lines
216 B
TypeScript
Raw Normal View History

A new start
2025-10-25 22:04:41 +02:00
import { getFeaturedModels, getFeaturedVideos } from "$lib/services";
export async function load({ fetch }) {
return {
fix: replace Directus SDK with native fetch for featured content Replace customEndpoint() with native fetch in getFeaturedModels() and getFeaturedVideos() to return plain JSON instead of non-serializable Directus SDK objects. This resolves the SvelteKit serialization error: "Cannot stringify arbitrary non-POJOs". Changes: - Use native fetch with PUBLIC_URL instead of getDirectusInstance() - Return plain JSON via response.json() instead of SDK request objects - Remove JSON.parse(JSON.stringify()) serialization hack from +page.server.ts - Rename fetch parameter to fetchFn for clarity 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 23:54:56 +01:00
models: await getFeaturedModels(3, fetch),
videos: await getFeaturedVideos(3, fetch),
A new start
2025-10-25 22:04:41 +02:00
};
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.4 Page: 27ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API