mirror of
https://github.com/Infisical/infisical.git
synced 2026-01-10 16:08:20 -05:00
parse invite url from mutationFn
This commit is contained in:
@@ -83,8 +83,14 @@ export const useAddUserToWs = () => {
|
||||
|
||||
export const useAddUserToOrg = () => {
|
||||
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),
|
||||
onSuccess: (_, { organizationId }) => {
|
||||
queryClient.invalidateQueries(userKeys.getOrgUsers(organizationId));
|
||||
|
||||
Reference in New Issue
Block a user