Move team_id to body of POST to create new Android cert template (#37432)

<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**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
This commit is contained in:
jacobshandling 2025-12-17 14:12:11 -08:00 committed by GitHub
parent 819ae07d3d
commit 50a52676aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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}`));