MCPcopy
hub / github.com/Dokploy/dokploy / findServerById

Function findServerById

packages/server/src/services/server.ts:39–54  ·  view source on GitHub ↗
(serverId: string)

Source from the content-addressed store, hash-verified

37};
38
39export const findServerById = async (serverId: string) => {
40 const currentServer = await db.query.server.findFirst({
41 where: eq(server.serverId, serverId),
42 with: {
43 deployments: true,
44 sshKey: true,
45 },
46 });
47 if (!currentServer) {
48 throw new TRPCError({
49 code: "NOT_FOUND",
50 message: "Server not found",
51 });
52 }
53 return currentServer;
54};
55
56export const findServersByUserId = async (userId: string) => {
57 const orgs = await db.query.organization.findMany({

Callers 15

getSFTPConnectionFunction · 0.90
getRemoteDockerFunction · 0.90
execAsyncRemoteFunction · 0.90
serverAuditFunction · 0.90
serverSetupFunction · 0.90
installRequirementsFunction · 0.90
setupMonitoringFunction · 0.90
serverValidateFunction · 0.90
generateTraefikMeDomainFunction · 0.90
createDeploymentFunction · 0.90
createDeploymentPreviewFunction · 0.90
createDeploymentComposeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected