misc: addressed comments 1

This commit is contained in:
Sheen Capadngan
2024-11-15 23:25:32 +08:00
parent 6bae3628c0
commit 433971a72d
13 changed files with 251 additions and 92 deletions
+14
View File
@@ -140,3 +140,17 @@ export const useDeleteUserTotpConfiguration = () => {
}
});
};
export const useCreateNewTotpRecoveryCodes = () => {
const queryClient = useQueryClient();
return useMutation({
mutationFn: async () => {
await apiRequest.post("/api/v1/user/me/totp/recovery-codes");
return {};
},
onSuccess: () => {
queryClient.invalidateQueries(userKeys.totpConfiguration);
}
});
};