From e616061c211f7afb57de5e11fb053d2668234e3d Mon Sep 17 00:00:00 2001 From: Rafael Date: Tue, 16 Dec 2025 19:10:23 -0300 Subject: [PATCH] fix: normalize IDs in pipeline run routes before calling Platform API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- .../platform-api/platform-api.controller.ts | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/modules/platform-api/platform-api.controller.ts b/src/modules/platform-api/platform-api.controller.ts index 3be5530..1f1fc98 100644 --- a/src/modules/platform-api/platform-api.controller.ts +++ b/src/modules/platform-api/platform-api.controller.ts @@ -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, ) { + 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, ) { + const normalizedRunId = this.normalizePipelineId(runId); return this.platformApiService.proxy( 'GET', - `/pipeline/pipeline_run/${runId}/logs`, + `/pipeline/pipeline_run/${normalizedRunId}/logs`, user, undefined, query,