refactor: use getVolumePath helper

This commit is contained in:
Nicolas Meienberger
2025-10-17 23:39:16 +02:00
parent 5b6a86331e
commit ad54948a69
4 changed files with 9 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
import type { BackendStatus } from "@ironmount/schemas";
import { VOLUME_MOUNT_BASE } from "../../core/constants";
import type { Volume } from "../../db/schema";
import { getVolumePath } from "../volumes/helpers";
import { makeDirectoryBackend } from "./directory/directory-backend";
import { makeNfsBackend } from "./nfs/nfs-backend";
import { makeSmbBackend } from "./smb/smb-backend";
@@ -18,7 +18,7 @@ export type VolumeBackend = {
};
export const createVolumeBackend = (volume: Volume): VolumeBackend => {
const path = `${VOLUME_MOUNT_BASE}/${volume.name}/_data`;
const path = getVolumePath(volume.name);
switch (volume.config.backend) {
case "nfs": {