diff --git a/frontend/src/hooks/api/users/queries.tsx b/frontend/src/hooks/api/users/queries.tsx index c6b35960d..5d0759755 100644 --- a/frontend/src/hooks/api/users/queries.tsx +++ b/frontend/src/hooks/api/users/queries.tsx @@ -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({ mutationFn: (dto) => apiRequest.post(`/api/v1/invite-org/signup`, dto), onSuccess: (_, { organizationId }) => { queryClient.invalidateQueries(userKeys.getOrgUsers(organizationId));