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

Function findPostgresById

packages/server/src/services/postgres.ts:66–97  ·  view source on GitHub ↗
(postgresId: string)

Source from the content-addressed store, hash-verified

64 return newPostgres;
65};
66export const findPostgresById = async (postgresId: string) => {
67 const result = await db.query.postgres.findFirst({
68 where: eq(postgres.postgresId, postgresId),
69 with: {
70 environment: {
71 with: {
72 project: true,
73 },
74 },
75 mounts: true,
76 server: true,
77 backups: {
78 with: {
79 destination: {
80 columns: {
81 accessKey: false,
82 secretAccessKey: false,
83 },
84 },
85 deployments: true,
86 },
87 },
88 },
89 });
90 if (!result) {
91 throw new TRPCError({
92 code: "NOT_FOUND",
93 message: "Postgres not found",
94 });
95 }
96 return result;
97};
98
99export const findPostgresByBackupId = async (backupId: string) => {
100 const result = await db

Callers 5

getServiceOrganizationIdFunction · 0.90
runRestoreFunction · 0.90
duplicateServiceFunction · 0.90
postgres.tsFile · 0.90
deployPostgresFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected