From 56b8885dc432fe126e53cfdc8034f57f5907bcbd Mon Sep 17 00:00:00 2001 From: marzban-dev Date: Thu, 16 Jan 2025 16:03:55 +0330 Subject: [PATCH] Updated --- frontend/plugins/axios.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/plugins/axios.ts b/frontend/plugins/axios.ts index 2a63f37..16ac61c 100644 --- a/frontend/plugins/axios.ts +++ b/frontend/plugins/axios.ts @@ -4,10 +4,10 @@ import { API_ENDPOINTS } from "~/constants"; export default defineNuxtPlugin(() => { const config = useRuntimeConfig(); - const { token } = useAuth(); + const { token, logout } = useAuth(); const axios = axiosOriginal.create({ - baseURL: config.public.API_BASE_URL, + baseURL: config.public.API_BASE_URL }); axios.interceptors.request.use((config) => { @@ -25,9 +25,9 @@ export default defineNuxtPlugin(() => { return response; }, function(error) { - if (error.status === 401) { - logout(); - } + // if (error.status === 401) { + // logout(); + // } return Promise.reject(error); });