From 78cbf0d85b177c44ca67592ec0049ef9e9fc3a64 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 13 Nov 2024 15:42:42 +0700 Subject: [PATCH] log logout --- src/api/api.checkin.ts | 2 ++ src/views/MainView.vue | 3 ++- vite.config.js | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/api/api.checkin.ts b/src/api/api.checkin.ts index 474c052..15ab966 100644 --- a/src/api/api.checkin.ts +++ b/src/api/api.checkin.ts @@ -4,4 +4,6 @@ const leave = `${env.API_URI}/leave` export default { checkin: () => `${leave}/check-in`, checkTime: () => `${leave}/check-time`, + + keycloakLogSSO: `${env.API_URI}/org/keycloak/log/sso`, } diff --git a/src/views/MainView.vue b/src/views/MainView.vue index a819da1..6d80cf9 100644 --- a/src/views/MainView.vue +++ b/src/views/MainView.vue @@ -111,7 +111,8 @@ function onClickLogout() { ok: 'ยืนยัน', persistent: true, }).onOk(async () => { - logout() + await http.post(config.API.keycloakLogSSO, { text: 'ออกจากระบบ' }) + await logout() }) } diff --git a/vite.config.js b/vite.config.js index 1e21411..6cdfa18 100644 --- a/vite.config.js +++ b/vite.config.js @@ -63,5 +63,4 @@ export default defineConfig({ optimizeDeps: { include: ['esri-loader'], }, - base: './', })