mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-06 08:06:43 +08:00
fix api path
This commit is contained in:
@@ -5,27 +5,27 @@ import FileBrowser from '@/components/FileBrowser.vue'
|
|||||||
|
|
||||||
const endpoints = {
|
const endpoints = {
|
||||||
list: {
|
list: {
|
||||||
url: '/filebrowser/{storage}/list?path={path}&sort={sort}&fileid={fileid}&filetype={filetype}',
|
url: '/{storage}/list?path={path}&sort={sort}&fileid={fileid}&filetype={filetype}',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
},
|
},
|
||||||
mkdir: {
|
mkdir: {
|
||||||
url: '/filebrowser/{storage}/mkdir?path={path}&fileid={fileid}',
|
url: '/{storage}/mkdir?path={path}&fileid={fileid}',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
},
|
},
|
||||||
delete: {
|
delete: {
|
||||||
url: '/filebrowser/{storage}/delete?path={path}&fileid={fileid}',
|
url: '/{storage}/delete?path={path}&fileid={fileid}',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
},
|
},
|
||||||
download: {
|
download: {
|
||||||
url: '/filebrowser/{storage}/download?path={path}&fileid={fileid}',
|
url: '/{storage}/download?path={path}&fileid={fileid}',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
},
|
},
|
||||||
image: {
|
image: {
|
||||||
url: '/filebrowser/{storage}/image?path={path}&fileid={fileid}',
|
url: '/{storage}/image?path={path}&fileid={fileid}',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
},
|
},
|
||||||
rename: {
|
rename: {
|
||||||
url: '/filebrowser/{storage}/rename?path={path}&new_name={newname}&fileid={fileid}&filetype={filetype}',
|
url: '/{storage}/rename?path={path}&new_name={newname}&fileid={fileid}&filetype={filetype}',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -92,12 +92,13 @@ async function loadDownloadDirectories() {
|
|||||||
// 目录变化
|
// 目录变化
|
||||||
function pathChanged(item: FileItem) {
|
function pathChanged(item: FileItem) {
|
||||||
path.value = item.path
|
path.value = item.path
|
||||||
fileid.value = item.fileid
|
if (item.fileid) {
|
||||||
if (item.fileid == 'root') return
|
fileid.value = item.fileid
|
||||||
if (fileidstack.value.includes(item.fileid)) {
|
if (fileidstack.value.includes(item.fileid)) {
|
||||||
fileidstack.value = fileidstack.value.slice(0, fileidstack.value.indexOf(item.fileid) + 1)
|
fileidstack.value = fileidstack.value.slice(0, fileidstack.value.indexOf(item.fileid) + 1)
|
||||||
} else {
|
} else {
|
||||||
fileidstack.value.push(item.fileid)
|
fileidstack.value.push(item.fileid)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user