From 8a8e27d27d98bc73319f49cb1ec5a15a00698c0f Mon Sep 17 00:00:00 2001 From: master <> Date: Fri, 27 Mar 2026 18:14:22 +0200 Subject: [PATCH] Fix approval API URLs to use correct v1/approvals/decision endpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Revert to /api/v1/approvals (not /api/v1/release-orchestrator/approvals). The gateway routes /api/v1/approvals/* → JobEngine, which registers the /decision endpoint via ReleaseControlV2Endpoints.PostApprovalDecision(). The /api/v1/release-orchestrator/approvals/{id}/approve endpoints are the classic routes from ApprovalEndpoints.cs — both work but the v1 /decision endpoint is the canonical one that supports approve/reject/ defer/escalate actions via a single body parameter. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../src/app/core/api/approval.client.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Web/StellaOps.Web/src/app/core/api/approval.client.ts b/src/Web/StellaOps.Web/src/app/core/api/approval.client.ts index 37352ecfb..4aceb93ab 100644 --- a/src/Web/StellaOps.Web/src/app/core/api/approval.client.ts +++ b/src/Web/StellaOps.Web/src/app/core/api/approval.client.ts @@ -32,8 +32,8 @@ export interface ApprovalApi { @Injectable() export class ApprovalHttpClient implements ApprovalApi { private readonly http = inject(HttpClient); - private readonly queueBaseUrl = '/api/v1/release-orchestrator/approvals'; - private readonly detailBaseUrl = '/api/v1/release-orchestrator/approvals'; + private readonly queueBaseUrl = '/api/v1/approvals'; + private readonly detailBaseUrl = '/api/v1/approvals'; listApprovals(filter?: ApprovalFilter): Observable { const params: Record = {}; @@ -78,16 +78,20 @@ export class ApprovalHttpClient implements ApprovalApi { } approve(id: string, comment: string): Observable { - return this.http.post(`${this.detailBaseUrl}/${id}/approve`, { + return this.http.post(`${this.detailBaseUrl}/${id}/decision`, { + action: 'approve', comment, + actor: 'ui-operator', }).pipe( map(row => this.mapV2ApprovalDetail(row)) ); } reject(id: string, comment: string): Observable { - return this.http.post(`${this.detailBaseUrl}/${id}/reject`, { + return this.http.post(`${this.detailBaseUrl}/${id}/decision`, { + action: 'reject', comment, + actor: 'ui-operator', }).pipe( map(row => this.mapV2ApprovalDetail(row)) );