mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 18:27:36 +00:00
parse invite url from mutationFn
This commit is contained in:
@@ -83,8 +83,14 @@ export const useAddUserToWs = () => {
|
|||||||
|
|
||||||
export const useAddUserToOrg = () => {
|
export const useAddUserToOrg = () => {
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
|
type Response = {
|
||||||
|
data: {
|
||||||
|
message: string,
|
||||||
|
completeInviteLink: string | undefined
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return useMutation<{}, {}, AddUserToOrgDTO>({
|
return useMutation<Response, {}, AddUserToOrgDTO>({
|
||||||
mutationFn: (dto) => apiRequest.post(`/api/v1/invite-org/signup`, dto),
|
mutationFn: (dto) => apiRequest.post(`/api/v1/invite-org/signup`, dto),
|
||||||
onSuccess: (_, { organizationId }) => {
|
onSuccess: (_, { organizationId }) => {
|
||||||
queryClient.invalidateQueries(userKeys.getOrgUsers(organizationId));
|
queryClient.invalidateQueries(userKeys.getOrgUsers(organizationId));
|
||||||
|
|||||||
Reference in New Issue
Block a user