diff --git a/apps/dokploy/__test__/git-provider/git-provider-access.test.ts b/apps/dokploy/__test__/git-provider/git-provider-access.test.ts index 4ddf36244a..714607538e 100644 --- a/apps/dokploy/__test__/git-provider/git-provider-access.test.ts +++ b/apps/dokploy/__test__/git-provider/git-provider-access.test.ts @@ -1,8 +1,8 @@ -import { beforeEach, describe, expect, it, vi } from "vitest"; import { canEditDeployGitSource, getAccessibleGitProviderIds, } from "@dokploy/server/services/git-provider"; +import { beforeEach, describe, expect, it, vi } from "vitest"; const mockDb = vi.hoisted(() => ({ query: { diff --git a/apps/dokploy/pages/index.tsx b/apps/dokploy/pages/index.tsx index a9aaf7263f..6d103bc74a 100644 --- a/apps/dokploy/pages/index.tsx +++ b/apps/dokploy/pages/index.tsx @@ -95,10 +95,12 @@ export default function Home({ IS_CLOUD, enforceSSO }: Props) { "Your email is not verified. We've sent a new verification link to your email."; toast.info(msg); setError(msg); + setIsLoginLoading(false); return; } toast.error(error.message); setError(error.message || "An error occurred while logging in"); + setIsLoginLoading(false); return; } @@ -107,14 +109,14 @@ export default function Home({ IS_CLOUD, enforceSSO }: Props) { setTwoFactorCode(""); setIsTwoFactor(true); toast.info("Please enter your 2FA code"); + setIsLoginLoading(false); return; } toast.success("Logged in successfully"); - router.push("/dashboard/home"); + await router.push("/dashboard/home"); } catch { toast.error("An error occurred while logging in"); - } finally { setIsLoginLoading(false); } }; @@ -134,14 +136,14 @@ export default function Home({ IS_CLOUD, enforceSSO }: Props) { if (error) { toast.error(error.message); setError(error.message || "An error occurred while verifying 2FA code"); + setIsTwoFactorLoading(false); return; } toast.success("Logged in successfully"); - router.push("/dashboard/home"); + await router.push("/dashboard/home"); } catch { toast.error("An error occurred while verifying 2FA code"); - } finally { setIsTwoFactorLoading(false); } }; @@ -164,14 +166,14 @@ export default function Home({ IS_CLOUD, enforceSSO }: Props) { setError( error.message || "An error occurred while verifying backup code", ); + setIsBackupCodeLoading(false); return; } toast.success("Logged in successfully"); - router.push("/dashboard/home"); + await router.push("/dashboard/home"); } catch { toast.error("An error occurred while verifying backup code"); - } finally { setIsBackupCodeLoading(false); } }; diff --git a/apps/dokploy/pages/invitation.tsx b/apps/dokploy/pages/invitation.tsx index 1cbd773b7b..11d55ff494 100644 --- a/apps/dokploy/pages/invitation.tsx +++ b/apps/dokploy/pages/invitation.tsx @@ -139,7 +139,7 @@ const Invitation = ({ }); toast.success("Account created successfully"); - router.push("/dashboard/home"); + await router.push("/dashboard/home"); } catch { toast.error("An error occurred while creating your account"); } diff --git a/packages/server/src/utils/cluster/upload.ts b/packages/server/src/utils/cluster/upload.ts index b4235c767a..0968afc7bd 100644 --- a/packages/server/src/utils/cluster/upload.ts +++ b/packages/server/src/utils/cluster/upload.ts @@ -1,8 +1,8 @@ import { findAllDeploymentsByApplicationId } from "@dokploy/server/services/deployment"; import { findRegistryByIdWithCredentials, - safeDockerLoginCommand, type Registry, + safeDockerLoginCommand, } from "@dokploy/server/services/registry"; import { createRollback } from "@dokploy/server/services/rollbacks"; import type { ApplicationNested } from "../builders";