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
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:
@@ -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 }),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user