From 7046796e4d107386545c84f55b53ef9dad452559 Mon Sep 17 00:00:00 2001 From: "Peter.Morton" Date: Thu, 21 Dec 2023 20:39:50 -0600 Subject: [PATCH] Added jwtDecode back in --- src/views/DebugView.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/views/DebugView.vue b/src/views/DebugView.vue index 433478a..e69f66e 100644 --- a/src/views/DebugView.vue +++ b/src/views/DebugView.vue @@ -4,6 +4,7 @@ import type { VueCookies } from "vue-cookies"; import type { JSONWebToken } from "../@types/JSONWebToken"; import type { ChannelAutomationAPI } from "../@types/ChannelAutomationAPI"; import { DataTable } from "@jobinsjp/vue3-datatable"; +import { jwtDecode } from "jwt-decode"; import "@jobinsjp/vue3-datatable/dist/style.css"; import ErrorMessage from "../components/ErrorMessage.vue"; @@ -31,8 +32,11 @@ onMounted(() => { }); getChannnelAutomationAPI() - .then((result) => { - channelAutomationAPI.value = result; + .then((result: ChannelAutomationAPI | undefined) => { + if (result) { + channelAutomationAPI.value = result; + jwtDecoded.value = jwtDecode(result.authentication); + } }) .catch((error: Error) => { errorMessage.value = error.message;