Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
fix: use put instead of post and improve var naming
Scott Wilson44544e0491f8
diff --git a/backend/src/server/routes/v1/external-group-org-role-mapping-router.ts b/backend/src/server/routes/v1/external-group-org-role-mapping-router.tsindex b123376b0d..032deda7d3 100644--- a/backend/src/server/routes/v1/external-group-org-role-mapping-router.ts+++ b/backend/src/server/routes/v1/external-group-org-role-mapping-router.ts@@ -38,7 +38,7 @@ export const registerExternalGroupOrgRoleMappingRouter = async (server: FastifyZ// update mappings for current orgserver.route({- method: "POST", // using post since this endpoint creates, updates and deletes mappings+ method: "PUT", // using put since this endpoint creates, updates and deletes mappingsurl: "/",config: {rateLimit: writeLimitdiff --git a/backend/src/services/org/org-role-fns.ts b/backend/src/services/org/org-role-fns.tsindex 56818b2f91..f460e18a4d 100644--- a/backend/src/services/org/org-role-fns.ts+++ b/backend/src/services/org/org-role-fns.ts@@ -5,8 +5,7 @@ import { TOrgRoleDALFactory } from "@app/services/org/org-role-dal";const RESERVED_ORG_ROLE_SLUGS = Object.values(OrgMembershipRole).filter((role) => role !== "custom");-export const isCustomOrgRole = (membershipSlug: string) =>- !RESERVED_ORG_ROLE_SLUGS.includes(membershipSlug as OrgMembershipRole);+export const isCustomOrgRole = (roleSlug: string) => !RESERVED_ORG_ROLE_SLUGS.includes(roleSlug as OrgMembershipRole);// this is only for updating an orgexport const getDefaultOrgMembershipRoleForUpdateOrg = async ({diff --git a/frontend/src/hooks/api/externalGroupOrgRoleMappings/mutations.tsx b/frontend/src/hooks/api/externalGroupOrgRoleMappings/mutations.tsxindex e88d3acc7f..aac46726a1 100644--- a/frontend/src/hooks/api/externalGroupOrgRoleMappings/mutations.tsx+++ b/frontend/src/hooks/api/externalGroupOrgRoleMappings/mutations.tsx@@ -8,7 +8,7 @@ export const useUpdateExternalGroupOrgRoleMappings = () => {const queryClient = useQueryClient();return useMutation({mutationFn: async (payload: TSyncExternalGroupOrgRoleMappingsDTO) => {- const { data } = await apiRequest.post("/api/v1/external-group-mappings", payload);+ const { data } = await apiRequest.put("/api/v1/external-group-mappings", payload);return data;},