refactor(mount): streamline mount update logic and improve readability

This commit is contained in:
yni9ht
2025-03-17 20:44:13 +08:00
parent 7c17cfb5c7
commit 371c6317aa

View File

@@ -123,8 +123,7 @@ export const updateMount = async (
mountId: string, mountId: string,
mountData: Partial<Mount>, mountData: Partial<Mount>,
) => { ) => {
return await db.transaction(async (tx) => { const mount = await db
const mount = await tx
.update(mounts) .update(mounts)
.set({ .set({
...mountData, ...mountData,
@@ -145,7 +144,6 @@ export const updateMount = async (
await createFileMount(mountId); await createFileMount(mountId);
} }
return mount; return mount;
});
}; };
export const findMountsByApplicationId = async ( export const findMountsByApplicationId = async (