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

Function updateMount

packages/server/src/services/mount.ts:226–254  ·  view source on GitHub ↗
(
	mountId: string,
	mountData: Partial<Mount>,
)

Source from the content-addressed store, hash-verified

224};
225
226export const updateMount = async (
227 mountId: string,
228 mountData: Partial<Mount>,
229) => {
230 const mount = await db.transaction(async (tx) => {
231 const mount = await tx
232 .update(mounts)
233 .set({
234 ...mountData,
235 })
236 .where(eq(mounts.mountId, mountId))
237 .returning()
238 .then((value) => value[0]);
239
240 if (!mount) {
241 throw new TRPCError({
242 code: "NOT_FOUND",
243 message: "Mount not found",
244 });
245 }
246
247 return await findMountById(mountId);
248 });
249
250 if (mount.type === "file") {
251 await updateFileMount(mountId);
252 }
253 return mount;
254};
255
256export const findMountsByApplicationId = async (
257 serviceId: string,

Callers 1

mount.tsFile · 0.90

Calls 2

findMountByIdFunction · 0.85
updateFileMountFunction · 0.85

Tested by

no test coverage detected