From 50a52676aaa17df8f239bf82401edaa0f879dada Mon Sep 17 00:00:00 2001 From: jacobshandling <61553566+jacobshandling@users.noreply.github.com> Date: Wed, 17 Dec 2025 14:12:11 -0800 Subject: [PATCH] Move `team_id` to body of `POST` to create new Android cert template (#37432) **Related issue:** Resolves #https://fleetdm.slack.com/archives/C09TL65SL9W/p1766008433598919?thread_ts=1766006822.589889&cid=C09TL65SL9W @marko-lisica as noted in the above thread, current API docs/spec here doesn't align with this, we'll need to update those also # Checklist for submitter - [ ] QA'd all new/changed functionality manually --- frontend/services/entities/certificates.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/services/entities/certificates.ts b/frontend/services/entities/certificates.ts index f6cda5c3ba..7a2c05a87a 100644 --- a/frontend/services/entities/certificates.ts +++ b/frontend/services/entities/certificates.ts @@ -11,6 +11,7 @@ import { ICertificatesSmallstep, ICertificatesCustomEST, } from "interfaces/certificates"; +import { API_ALL_TEAMS_ID, APP_CONTEXT_ALL_TEAMS_ID } from "interfaces/team"; import { ListEntitiesResponsePaginationCommon, PaginationParams, @@ -126,12 +127,9 @@ export default { name, certificate_authority_id: certAuthorityId, subject_name: subjectName, + team_id: teamId === APP_CONTEXT_ALL_TEAMS_ID ? API_ALL_TEAMS_ID : teamId, }; - return sendRequest( - "POST", - teamId ? CERTIFICATES.concat(`?team_id=${teamId}`) : CERTIFICATES, - requestBody - ); + return sendRequest("POST", CERTIFICATES, requestBody); }, deleteCert: (id: number) => { return sendRequest("DELETE", endpoints.CERTIFICATES.concat(`/${id}`));