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

View file

@ -4,7 +4,7 @@ import { storeToRefs } from 'pinia'
import axiosClient from '@/services/HttpService'
import mime from 'mime'
import type { EhrFile } from '@/stores/tree-data'
import type { StorageFile } from '@/stores/storage'
import { useSearchDataStore } from '@/stores/searched-data'
import { useLoader } from '@/stores/loader'
@ -92,7 +92,7 @@ async function searchSubmit() {
try {
loaderStore.show()
const res = await axiosClient.post<EhrFile[]>(
const res = await axiosClient.post<StorageFile[]>(
`${import.meta.env.VITE_API_ENDPOINT}/search`,
submitSearchData.value,
)