diff --git a/apps/dokploy/pages/api/deploy/github.ts b/apps/dokploy/pages/api/deploy/github.ts index 6a1135cbe..2ffdc0786 100644 --- a/apps/dokploy/pages/api/deploy/github.ts +++ b/apps/dokploy/pages/api/deploy/github.ts @@ -3,7 +3,7 @@ import { applications, compose, github } from "@/server/db/schema"; import type { DeploymentJob } from "@/server/queues/deployments-queue"; import { myQueue } from "@/server/queues/queueSetup"; import { deploy } from "@/server/utils/deploy"; -import { IS_CLOUD, findAdmin } from "@dokploy/server"; +import { IS_CLOUD } from "@dokploy/server"; import { Webhooks } from "@octokit/webhooks"; import { and, eq } from "drizzle-orm"; import type { NextApiRequest, NextApiResponse } from "next"; @@ -13,13 +13,6 @@ export default async function handler( req: NextApiRequest, res: NextApiResponse, ) { - const admin = await findAdmin(); - - if (!admin) { - res.status(200).json({ message: "Could not find admin" }); - return; - } - const signature = req.headers["x-hub-signature-256"]; const githubBody = req.body; diff --git a/packages/server/src/services/admin.ts b/packages/server/src/services/admin.ts index be48dc967..450883029 100644 --- a/packages/server/src/services/admin.ts +++ b/packages/server/src/services/admin.ts @@ -9,6 +9,7 @@ import { import { TRPCError } from "@trpc/server"; import * as bcrypt from "bcrypt"; import { eq } from "drizzle-orm"; +import { IS_CLOUD } from "../constants"; export type Admin = typeof admins.$inferSelect; export const createInvitation = async ( @@ -141,6 +142,9 @@ export const removeUserByAuthId = async (authId: string) => { }; export const getDokployUrl = async () => { + if (IS_CLOUD) { + return "https://app.dokploy.com"; + } const admin = await findAdmin(); if (admin.host) {