-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Migrate CDN file metadata operations to use D1 Sessions API.
Why
- CDN file lookups happen during media serving
- File listing/browsing is read-heavy in admin interface
- Consistent with overall Sessions API adoption
Files to Modify
landing/src/lib/server/db.ts
Functions to Update
getCdnFile()getCdnFileByKey()listCdnFiles()listAllCdnFiles()getCdnFolders()
Changes Required
Same pattern as Phase 2:
export async function getCdnFile(
db: D1Database | D1Session,
id: string
): Promise<CdnFile | null>Testing
- Media files serve correctly
- File listing works in admin
- Folder navigation works
- File upload still works (write operation)
Dependencies
- Phase 1 (auth hooks) should be completed first
References
docs/D1_REPLICATION_ANALYSIS.mddocs/D1_SESSIONS_MIGRATION.md
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request