refactor: use controller approach in handlers

This commit is contained in:
Stavros
2025-08-25 16:40:06 +03:00
parent e1d8ce3cb5
commit dfdc656145
23 changed files with 910 additions and 1428 deletions

View File

@@ -26,7 +26,7 @@ export const LogoutPage = () => {
const { t } = useTranslation();
const logoutMutation = useMutation({
mutationFn: () => axios.post("/api/logout"),
mutationFn: () => axios.post("/api/user/logout"),
mutationKey: ["logout"],
onSuccess: () => {
toast.success(t("logoutSuccessTitle"), {

View File

@@ -32,7 +32,7 @@ export const TotpPage = () => {
const redirectUri = searchParams.get("redirect_uri");
const totpMutation = useMutation({
mutationFn: (values: TotpSchema) => axios.post("/api/totp", values),
mutationFn: (values: TotpSchema) => axios.post("/api/user/totp", values),
mutationKey: ["totp"],
onSuccess: () => {
toast.success(t("totpSuccessTitle"), {