Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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: {
Expand Down
14 changes: 8 additions & 6 deletions apps/dokploy/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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);
}
};
Expand All @@ -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);
}
};
Expand All @@ -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);
}
};
Expand Down
2 changes: 1 addition & 1 deletion apps/dokploy/pages/invitation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down
2 changes: 1 addition & 1 deletion packages/server/src/utils/cluster/upload.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down