Files
sexy.pivoine.art/packages/frontend
Valknar XXX cd6e8b7b3d feat: migrate all API calls to custom bundle endpoints
This commit completes the migration of all API calls from direct Directus
SDK calls to custom bundle endpoints, bypassing Directus permissions using
direct database queries via Knex.

Backend changes (packages/bundle/src/endpoint/index.ts):
- Added /sexy/models endpoint with optional featured and limit filters
- Added /sexy/models/:slug endpoint for single model lookup
- Added /sexy/videos endpoint with optional model_id filter
- Added /sexy/articles endpoint with optional featured filter
- All endpoints use Knex for direct database access, bypassing permissions
- Endpoints handle nested relationships (photos, banner, models, movie, author)

Frontend changes (packages/frontend/src/lib/services.ts):
- Updated getVideos() to use /sexy/videos custom endpoint
- Updated getVideosForModel() to use /sexy/videos with model_id query param
- Updated getFeaturedVideos() to use /sexy/videos with limit param
- Updated getArticles() to use /sexy/articles custom endpoint
- Updated getModelBySlug() to use /sexy/models/:slug custom endpoint
- Simplified service layer by moving filtering logic to backend

Benefits:
- Complete bypass of Directus permissions layer
- Consistent API pattern across all endpoints
- Centralized business logic in backend
- Cleaner frontend service code
- All endpoints tested and working

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 11:17:51 +01:00
..
2025-10-25 22:04:41 +02:00
2025-10-25 22:04:41 +02:00
2025-10-25 22:04:41 +02:00
2025-10-25 22:04:41 +02:00
2025-10-25 22:29:06 +02:00
2025-10-25 22:04:41 +02:00
2025-10-25 22:04:41 +02:00
2025-10-25 22:04:41 +02:00