remove keycloak change use cookie only

This commit is contained in:
Warunee Tamkoo 2024-08-28 11:14:21 +07:00
parent 24374ab8f2
commit 92b85ce4ef
23 changed files with 236 additions and 189 deletions

View file

@ -3,11 +3,11 @@ import { ref, watch, onMounted, reactive } from "vue";
import { useRouter, useRoute } from "vue-router";
import { VuePDF, usePDF } from "@tato30/vue-pdf";
import { useQuasar } from "quasar";
import keycloak from "@/plugins/keycloak";
import http from "@/plugins/http";
import config from "@/app.config";
import axios from "axios";
import genReport from "@/plugins/genreport";
import { tokenParsed } from "@/plugins/auth";
/** importType*/
import type { FormCommand } from "@/modules/06_evaluate/interface/evalute";
@ -401,8 +401,9 @@ async function downloadFile(fileName: string) {
/**lifecycle Hooks*/
onMounted(async () => {
if (keycloak.tokenParsed != null) {
formCommand.author = keycloak.tokenParsed.name;
const user = await tokenParsed();
if (user) {
formCommand.author = user.name;
}
showLoader();
await Promise.all([