mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-18 04:58:28 +00:00
feature: scim group org role mapping
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||
|
||||
import { apiRequest } from "@app/config/request";
|
||||
import { externalGroupOrgRoleMappingKeys } from "@app/hooks/api/externalGroupOrgRoleMappings/queries";
|
||||
import { TSyncExternalGroupOrgRoleMappingsDTO } from "@app/hooks/api/externalGroupOrgRoleMappings/types";
|
||||
|
||||
export const useUpdateExternalGroupOrgRoleMappings = () => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: async (payload: TSyncExternalGroupOrgRoleMappingsDTO) => {
|
||||
const { data } = await apiRequest.post("/api/v1/external-group-mappings", payload);
|
||||
|
||||
return data;
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries(externalGroupOrgRoleMappingKeys.list());
|
||||
}
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user