refactor: migrate to storage

refactor: migrate to storage
This commit is contained in:
Methapon2001 2023-12-11 15:51:59 +07:00
parent 4bdf1f620b
commit cc87de5995
No known key found for this signature in database
GPG key ID: 849924FEF46BD132
12 changed files with 388 additions and 879 deletions

View file

@ -3,7 +3,7 @@ import axios from 'axios'
import { storeToRefs } from 'pinia'
import axiosClient from '@/services/HttpService'
import type { EhrFile } from '@/stores/tree-data'
import type { StorageFile } from '@/stores/storage'
import { useFileInfoStore } from '@/stores/file-info-data'
import FileIcon from '@/components/FileIcon.vue'
@ -25,7 +25,7 @@ async function downloadSubmit(path: string | undefined) {
formatPath = `cabinet/${cabinet}/drawer/${drawer}/folder/${folder}/subfolder/${subfolder}/file/${file}`
}
const res = await axiosClient.get<EhrFile & { download: string }>(
const res = await axiosClient.get<StorageFile & { download: string }>(
`${import.meta.env.VITE_API_ENDPOINT}${formatPath}`,
)
await axios