7
src/app.config.js
Normal file
7
src/app.config.js
Normal file
@@ -0,0 +1,7 @@
|
||||
export const apiBaseUrl = import.meta.env.VITE_API_BASE_URL
|
||||
export const routerBase = import.meta.env.VITE_ROUTER_BASE
|
||||
|
||||
export default {
|
||||
apiBaseUrl,
|
||||
routerBase,
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
import { apiBaseUrl } from '../app.config.js';
|
||||
|
||||
export function getAuthKeyFromProperties(props) {
|
||||
var authKey;
|
||||
|
||||
@@ -27,9 +29,7 @@ export function getTenantProperty(key, props) {
|
||||
var authKey = getAuthKeyFromProperties(props);
|
||||
console.log(`Fetching TPS Property [${key}]`);
|
||||
fetch(
|
||||
`${
|
||||
import.meta.env.VITE_EO_SERVICES_URL
|
||||
}/api/tps?propertyName=${key}&authKey=${authKey}`,
|
||||
`${apiBaseUrl}/tps?propertyName=${key}&authKey=${authKey}`,
|
||||
{
|
||||
credentials: "include", // fetch won't send cookies unless you set credentials
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { createRouter, createWebHistory } from "vue-router";
|
||||
import { routerBase } from '../app.config.js';
|
||||
import HomeView from "../views/HomeView.vue";
|
||||
import AboutView from "../views/AboutView.vue";
|
||||
import DebugFrameView from "../views/DebugFrameView.vue";
|
||||
@@ -62,9 +63,11 @@ const routes = [
|
||||
},
|
||||
];
|
||||
|
||||
console.log(`mounting router on ${routerBase}`)
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
base: `${import.meta.env.VITE_ROUTER_BASE}`,
|
||||
base: routerBase,
|
||||
routes,
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script setup>
|
||||
import { apiBaseUrl } from '../app.config.js';
|
||||
import { ref, onMounted } from "vue";
|
||||
import { getAuthKeyFromProperties } from "../helpers/index";
|
||||
|
||||
@@ -43,7 +44,7 @@ function fetchData() {
|
||||
return;
|
||||
}
|
||||
fetch(
|
||||
`${import.meta.env.VITE_EO_SERVICES_URL}/api/interactions-flow?filter=${
|
||||
`${apiBaseUrl}/interactions-flow?filter=${
|
||||
multiSelected.value
|
||||
}&authKey=${authKey}`,
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script setup>
|
||||
import { apiBaseUrl } from '../app.config.js';
|
||||
import { ref } from "vue";
|
||||
import { getAuthKeyFromProperties } from "../helpers/index";
|
||||
|
||||
@@ -28,9 +29,7 @@ function fetchData() {
|
||||
|
||||
if (authKey) {
|
||||
fetch(
|
||||
`${
|
||||
import.meta.env.VITE_EO_SERVICES_URL
|
||||
}/api/unified-data-gateway?referenceId=${
|
||||
`${apiBaseUrl}/unified-data-gateway?referenceId=${
|
||||
referenceId.value
|
||||
}&authKey=${authKey}`,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user