Added jwtDecode back in
This commit is contained in:
parent
e49af9e5a3
commit
7046796e4d
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user