mirror of
https://github.com/dadosfera/maestro.git
synced 2026-10-05 08:19:08 +00:00
fix: normalize IDs in pipeline run routes before calling Platform API
- Add normalization for pipelineId and runId in getPipelineRuns, getPipelineRun, and getPipelineRunLogs - Remove unused createPipelineRun route 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
e03b9e7a14
commit
e616061c21
@@ -691,18 +691,6 @@ export class PlatformApiController {
|
||||
|
||||
// ==================== PIPELINE RUN ROUTES ====================
|
||||
|
||||
@Post('pipeline/pipeline_run')
|
||||
@ApiOperation({ summary: 'Create a pipeline run' })
|
||||
@RequireAllPermissions(PERMISSIONS_GROUPS.PIPELINE.permissions.UPDATE)
|
||||
async createPipelineRun(@Body() body: any, @User() user: RequestUser) {
|
||||
return this.platformApiService.proxy(
|
||||
'POST',
|
||||
'/pipeline/pipeline_run',
|
||||
user,
|
||||
body,
|
||||
);
|
||||
}
|
||||
|
||||
@Get('pipeline/:pipelineId/pipeline_run')
|
||||
@ApiOperation({ summary: 'Get pipeline runs for a pipeline' })
|
||||
@RequireAllPermissions(PERMISSIONS_GROUPS.PIPELINE.permissions.GET)
|
||||
@@ -711,9 +699,10 @@ export class PlatformApiController {
|
||||
@User() user: RequestUser,
|
||||
@Query() query: Record<string, string>,
|
||||
) {
|
||||
const normalizedId = this.normalizePipelineId(pipelineId);
|
||||
return this.platformApiService.proxy(
|
||||
'GET',
|
||||
`/pipeline/${pipelineId}/pipeline_run`,
|
||||
`/pipeline/${normalizedId}/pipeline_run`,
|
||||
user,
|
||||
undefined,
|
||||
query,
|
||||
@@ -728,9 +717,11 @@ export class PlatformApiController {
|
||||
@Param('runId') runId: string,
|
||||
@User() user: RequestUser,
|
||||
) {
|
||||
const normalizedPipelineId = this.normalizePipelineId(pipelineId);
|
||||
const normalizedRunId = this.normalizePipelineId(runId);
|
||||
return this.platformApiService.proxy(
|
||||
'GET',
|
||||
`/pipeline/${pipelineId}/pipeline_run/${runId}`,
|
||||
`/pipeline/${normalizedPipelineId}/pipeline_run/${normalizedRunId}`,
|
||||
user,
|
||||
);
|
||||
}
|
||||
@@ -743,9 +734,10 @@ export class PlatformApiController {
|
||||
@User() user: RequestUser,
|
||||
@Query() query: Record<string, string>,
|
||||
) {
|
||||
const normalizedRunId = this.normalizePipelineId(runId);
|
||||
return this.platformApiService.proxy(
|
||||
'GET',
|
||||
`/pipeline/pipeline_run/${runId}/logs`,
|
||||
`/pipeline/pipeline_run/${normalizedRunId}/logs`,
|
||||
user,
|
||||
undefined,
|
||||
query,
|
||||
|
||||
Reference in New Issue
Block a user