From e549e778117d70fd6f24e35e3ee5a0a678b821a0 Mon Sep 17 00:00:00 2001 From: iDefineHD Date: Sun, 11 Jan 2026 02:51:50 +0000 Subject: [PATCH] changed the navbar to work. --- frontend/src/stores/auth.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/frontend/src/stores/auth.js b/frontend/src/stores/auth.js index 394da19..144d9ff 100644 --- a/frontend/src/stores/auth.js +++ b/frontend/src/stores/auth.js @@ -1,6 +1,6 @@ import { defineStore } from "pinia"; import { ref, computed } from "vue"; -import axios from "axios"; +import axios from "@/utils/axios"; import { useToast } from "vue-toastification"; const toast = useToast(); @@ -47,7 +47,7 @@ export const useAuthStore = defineStore("auth", () => { console.log("🔵 fetchUser called - fetching user from /api/auth/me"); isLoading.value = true; try { - const response = await axios.get("/api/auth/me", { + const response = await axios.get("/auth/me", { withCredentials: true, }); @@ -86,7 +86,7 @@ export const useAuthStore = defineStore("auth", () => { isLoading.value = true; try { await axios.post( - "/api/auth/logout", + "/auth/logout", {}, { withCredentials: true, @@ -111,7 +111,7 @@ export const useAuthStore = defineStore("auth", () => { const refreshToken = async () => { try { await axios.post( - "/api/auth/refresh", + "/auth/refresh", {}, { withCredentials: true, @@ -129,7 +129,7 @@ export const useAuthStore = defineStore("auth", () => { isLoading.value = true; try { const response = await axios.patch( - "/api/user/trade-url", + "/user/trade-url", { tradeUrl }, { withCredentials: true } ); @@ -155,7 +155,7 @@ export const useAuthStore = defineStore("auth", () => { isLoading.value = true; try { const response = await axios.patch( - "/api/user/email", + "/user/email", { email }, { withCredentials: true } ); @@ -178,7 +178,7 @@ export const useAuthStore = defineStore("auth", () => { const verifyEmail = async (token) => { isLoading.value = true; try { - const response = await axios.get(`/api/user/verify-email/${token}`, { + const response = await axios.get(`/user/verify-email/${token}`, { withCredentials: true, }); @@ -199,7 +199,7 @@ export const useAuthStore = defineStore("auth", () => { const getUserStats = async () => { try { - const response = await axios.get("/api/user/stats", { + const response = await axios.get("/user/stats", { withCredentials: true, }); @@ -215,7 +215,7 @@ export const useAuthStore = defineStore("auth", () => { const getBalance = async () => { try { - const response = await axios.get("/api/user/balance", { + const response = await axios.get("/user/balance", { withCredentials: true, });