refactor: remove findAdmin

This commit is contained in:
Mauricio Siu
2024-10-06 15:04:54 -06:00
parent e995d894d8
commit 5b88af6158
2 changed files with 5 additions and 8 deletions

View File

@@ -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) {