From 4e29e6ce71f7ecca6cf194e7ba08df8fcfd390b2 Mon Sep 17 00:00:00 2001 From: "Peter.Morton" Date: Thu, 21 Dec 2023 14:57:31 -0600 Subject: [PATCH] make key optional and updated TelephonyContext example --- src/helpers/index.ts | 9 +++++---- src/views/HomePage.vue | 2 +- vite.config.ts | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/helpers/index.ts b/src/helpers/index.ts index f1e66b1..8aad196 100644 --- a/src/helpers/index.ts +++ b/src/helpers/index.ts @@ -46,11 +46,12 @@ export async function getTenantProperty( "Content-Type": "application/json", }; + let url = `${channelAutomationAPI.host}/tenant-properties-service/${channelAutomationAPI.tenant}/properties?fields=name,value`; + + if (key) url += `&q=${key}`; + return await axios - .get( - `${channelAutomationAPI.host}/tenant-properties-service/${channelAutomationAPI.tenant}/properties?fields=name,value,lastModifiedDate,lastModifiedBy?&q=${key}`, - { headers }, - ) + .get(url, { headers }) .then((response: { data: HydraCollection }) => { const totalItems = response.data["hydra:totalItems"]; console.debug("tps result has hydra:totalItems [" + totalItems + "]"); diff --git a/src/views/HomePage.vue b/src/views/HomePage.vue index f50e1de..69bf2d7 100644 --- a/src/views/HomePage.vue +++ b/src/views/HomePage.vue @@ -7,7 +7,7 @@
  • Telephony Context diff --git a/vite.config.ts b/vite.config.ts index 73f94bc..d4bbf62 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -6,7 +6,7 @@ import mkcert from "vite-plugin-mkcert"; // https://vitejs.dev/config/ export default defineConfig(({ command }) => { if (command === "build") { - return { plugins: [vue()], base: "/ca_vue_apps/dist" }; + return { plugins: [vue()] }; } else { return { cors: {