Added jwtDecode back in

This commit is contained in:
Peter Morton 2023-12-21 20:39:50 -06:00
parent e49af9e5a3
commit 7046796e4d

View File

@ -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;