chore: remove unused
This commit is contained in:
parent
6a5ccc09a5
commit
bfe92690c4
1 changed files with 0 additions and 25 deletions
|
|
@ -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<string>((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,
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue