fix(training): resolve Gin route param conflicts for content/media routes
All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Successful in 45s
CI / test-python-backend-compliance (push) Successful in 34s
CI / test-python-document-crawler (push) Successful in 22s
CI / test-python-dsms-gateway (push) Successful in 20s

Use consistent :moduleId param name for content routes and :mediaId for
media routes. Add param adapters for handlers that expect different names.
Fix frontend media API paths to match backend route structure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-02-26 09:52:15 +01:00
parent e5cb5e37ad
commit 71bc48449d
2 changed files with 16 additions and 5 deletions

View File

@@ -292,11 +292,11 @@ export async function getModuleMedia(moduleId: string): Promise<{ media: Trainin
}
export async function getMediaURL(mediaId: string): Promise<{ bucket: string; object_key: string; mime_type: string }> {
return apiFetch(`/media/module/${mediaId}/url`)
return apiFetch(`/media/${mediaId}/url`)
}
export async function publishMedia(mediaId: string, publish?: boolean): Promise<{ status: string; is_published: boolean }> {
return apiFetch(`/media/module/${mediaId}/publish`, {
return apiFetch(`/media/${mediaId}/publish`, {
method: 'POST',
body: JSON.stringify({ publish: publish !== false }),
})