From 3c112d22a40363597f7c8c03b39b368f182c6287 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Sat, 23 Dec 2023 12:54:46 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20path=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/document.ts | 7 +++---- src/api/index.ts | 2 +- src/views/HomeView.vue | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) 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) {