diff --git a/src/api/document.ts b/src/api/document.ts index a0fe108..a3cc4c7 100644 --- a/src/api/document.ts +++ b/src/api/document.ts @@ -1,9 +1,8 @@ import type { StorageFile } from '@/interface/response/storage' - -const API_URI = import.meta.env.VITE_API_URI_CONFIG +import config from "@/api"; export async function getDocumentList(volume: string, id: string) { - const res = await fetch(`${API_URI}/document/${volume}/${id}`, { + const res = await fetch(`${config.API_URI}/document/${volume}/${id}`, { headers: { Accept: 'application/json', }, @@ -20,7 +19,7 @@ export async function getDocumentInfo( id: string, file: string ) { - const res = await fetch(`${API_URI}/document/${volume}/${id}/${file}`, { + const res = await fetch(`${config.API_URI}/document/${volume}/${id}/${file}`, { headers: { Accept: 'application/json', }, diff --git a/src/api/index.ts b/src/api/index.ts index 1a28e27..3b2c929 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -10,7 +10,7 @@ export const apiUrlConfig = import.meta.env.VITE_API_URI_CONFIG const config = ref({ development: { // API_URI: "https://localhost:7260/api", - API_URI: 'https://bma-ehr.frappet.synology.me/api/v1', + API_URI: 'https://bma-ehr.frappet.synology.me/api/v1/evaluation', }, test: { API_URI: 'http://localhost:5010/api/v1', diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index cc2df7e..5363e62 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -14,7 +14,7 @@ onMounted(async () => { const result = await doc.info( 'เล่ม 2', route.params.id as string, - '1-เอกสาร 2' + '1-เอกสารเล่ม 2' ) if (result) {