Begin groups phase 2b

This commit is contained in:
Tuan Dang
2024-04-19 16:16:16 -07:00
parent a087deb1eb
commit 54fcc23a6c
24 changed files with 394 additions and 34 deletions
+6 -1
View File
@@ -1,4 +1,9 @@
export { useAddUserToWsE2EE, useAddUserToWsNonE2EE } from "./mutation";
export {
useAddUserToWsE2EE,
useAddUserToWsNonE2EE,
useSendEmailVerificationCode,
useVerifyEmailVerificationCode
} from "./mutation";
export {
fetchOrgUsers,
useAddUserToOrg,
+20
View File
@@ -61,3 +61,23 @@ export const useAddUserToWsNonE2EE = () => {
}
});
};
export const useSendEmailVerificationCode = () => {
return useMutation({
mutationFn: async () => {
await apiRequest.post("/api/v2/users/me/emails/code");
return {};
}
});
};
export const useVerifyEmailVerificationCode = () => {
return useMutation({
mutationFn: async ({ code }: { code: string }) => {
await apiRequest.post("/api/v2/users/me/emails/verify", {
code
});
return {};
}
});
};