updated api config

This commit is contained in:
Warunee Tamkoo 2024-12-18 12:02:38 +07:00
parent 4d0137749c
commit 7c1f4502ec
2 changed files with 16 additions and 13 deletions

View file

@ -2,8 +2,10 @@
import { ref } from "vue";
const env = ref<string>(process.env.NODE_ENV || "development");
export const apiUrlConfig = import.meta.env.VITE_API_URI_CONFIG;
export const apiUrlConfigPublish = import.meta.env.VITE_API_PUBLISH_URL;
export const apiUrlConfigReport = import.meta.env.VITE_API_REPORT_URL;
export const apiUrlConfigReport2 = import.meta.env.VITE_API_URI_REPORT_CONFIG;
// if (process.env.VUE_APP_TEST) {
// env = "test";
// }
@ -45,22 +47,22 @@ const config = ref<any>({
},
production: {
// API_URI: "https://localhost:5010",
API_URI: `${window.location.protocol}//${window.location.host}/api/v1`,
API_URI_ORG_SERVICE: `${window.location.protocol}//${window.location.host}/api/v1`, //ใช้ชั่วคราว
API_URI_ORG_EMPLOYEE_SERVICE: `${window.location.protocol}//${window.location.host}/api/v1`, //ใช้ชั่วคราว
API_URI_PROFILE_SERVICE: `${window.location.protocol}//${window.location.host}/api/v1`,
API_CANDIDATE_URI: `${window.location.protocol}//${window.location.host}/api/v1`,
API_REPORT_URI: `${window.location.protocol}//${window.location.host}/api/v1`,
API_PLACEMENT_URI: `${window.location.protocol}//${window.location.host}/api/v1`,
API_URI: apiUrlConfig,
API_URI_ORG_SERVICE: apiUrlConfig, //ใช้ชั่วคราว
API_URI_ORG_EMPLOYEE_SERVICE: apiUrlConfig, //ใช้ชั่วคราว
API_URI_PROFILE_SERVICE: apiUrlConfig,
API_CANDIDATE_URI: apiUrlConfig,
API_REPORT_URI: apiUrlConfig,
API_PLACEMENT_URI: apiUrlConfig,
API_URI_ORG_TREE:
"https://s3cluster.frappet.com/bma-ehr-fpt/organization/strueture/tree_20230707_115124.json",
MEET_URI: "meet.frappet.com",
API_RETIREMENT_URI: `${window.location.protocol}//${window.location.host}/api/v1`,
API_PROBATION_URI: `${window.location.protocol}//${window.location.host}/api/v1/probation`,
API_REPORT2_URI: `${window.location.protocol}//${window.location.host}/api/v2`,
API_RETIREMENT_URI: apiUrlConfig,
API_PROBATION_URI: `${apiUrlConfig}/probation`,
API_REPORT2_URI: `${apiUrlConfigReport2}`,
LINK_EVALUATE_PUBLISH: apiUrlConfigPublish,
API_REPORT_TEMPLATE_URI: apiUrlConfigReport,
API_SUPPORT_URI: `${window.location.protocol}//${window.location.host}/api/v1/support`,
API_SUPPORT_URI: `${apiUrlConfigPublish}/support`,
},
});