From bfe92690c436c04184bc218819043db345523295 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Fri, 15 Dec 2023 11:15:15 +0700 Subject: [PATCH] chore: remove unused --- Services/client/src/stores/storage.ts | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/Services/client/src/stores/storage.ts b/Services/client/src/stores/storage.ts index e125d0b..b41b2dd 100644 --- a/Services/client/src/stores/storage.ts +++ b/Services/client/src/stores/storage.ts @@ -41,30 +41,6 @@ export interface Structure extends StorageFolder { type Tree = Structure[] -function constructUrl(path: string | string[], append = true) { - const arr = Array.isArray(path) ? path : path.split('/').filter(Boolean) - const url = - import.meta.env.VITE_API_ENDPOINT + - arr.reduce((a, v, i) => { - switch (String(i)) { - case '0': - return `cabinet/${v}` - case '1': - return `${a}/drawer/${v}` - case '2': - return `${a}/folder/${v}` - case '3': - return `${a}/subfolder/${v}` - default: - return a - } - }, '') - - return append - ? url + ['cabinet', '/drawer', '/folder', '/subfolder'][arr.length] - : url -} - function consistantPath(path: string | string[]) { return Array.isArray(path) ? path.join('/') + '/' @@ -512,7 +488,6 @@ const useStorage = defineStore('storageStore', () => { createFile, updateFile, deleteFile, - constructUrl, consistantPath, } })