changed the navbar to work.
All checks were successful
Build Frontend / Build Frontend (push) Successful in 9s
All checks were successful
Build Frontend / Build Frontend (push) Successful in 9s
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
import axios from "axios";
|
import axios from "@/utils/axios";
|
||||||
import { useToast } from "vue-toastification";
|
import { useToast } from "vue-toastification";
|
||||||
|
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
@@ -47,7 +47,7 @@ export const useAuthStore = defineStore("auth", () => {
|
|||||||
console.log("🔵 fetchUser called - fetching user from /api/auth/me");
|
console.log("🔵 fetchUser called - fetching user from /api/auth/me");
|
||||||
isLoading.value = true;
|
isLoading.value = true;
|
||||||
try {
|
try {
|
||||||
const response = await axios.get("/api/auth/me", {
|
const response = await axios.get("/auth/me", {
|
||||||
withCredentials: true,
|
withCredentials: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ export const useAuthStore = defineStore("auth", () => {
|
|||||||
isLoading.value = true;
|
isLoading.value = true;
|
||||||
try {
|
try {
|
||||||
await axios.post(
|
await axios.post(
|
||||||
"/api/auth/logout",
|
"/auth/logout",
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
withCredentials: true,
|
withCredentials: true,
|
||||||
@@ -111,7 +111,7 @@ export const useAuthStore = defineStore("auth", () => {
|
|||||||
const refreshToken = async () => {
|
const refreshToken = async () => {
|
||||||
try {
|
try {
|
||||||
await axios.post(
|
await axios.post(
|
||||||
"/api/auth/refresh",
|
"/auth/refresh",
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
withCredentials: true,
|
withCredentials: true,
|
||||||
@@ -129,7 +129,7 @@ export const useAuthStore = defineStore("auth", () => {
|
|||||||
isLoading.value = true;
|
isLoading.value = true;
|
||||||
try {
|
try {
|
||||||
const response = await axios.patch(
|
const response = await axios.patch(
|
||||||
"/api/user/trade-url",
|
"/user/trade-url",
|
||||||
{ tradeUrl },
|
{ tradeUrl },
|
||||||
{ withCredentials: true }
|
{ withCredentials: true }
|
||||||
);
|
);
|
||||||
@@ -155,7 +155,7 @@ export const useAuthStore = defineStore("auth", () => {
|
|||||||
isLoading.value = true;
|
isLoading.value = true;
|
||||||
try {
|
try {
|
||||||
const response = await axios.patch(
|
const response = await axios.patch(
|
||||||
"/api/user/email",
|
"/user/email",
|
||||||
{ email },
|
{ email },
|
||||||
{ withCredentials: true }
|
{ withCredentials: true }
|
||||||
);
|
);
|
||||||
@@ -178,7 +178,7 @@ export const useAuthStore = defineStore("auth", () => {
|
|||||||
const verifyEmail = async (token) => {
|
const verifyEmail = async (token) => {
|
||||||
isLoading.value = true;
|
isLoading.value = true;
|
||||||
try {
|
try {
|
||||||
const response = await axios.get(`/api/user/verify-email/${token}`, {
|
const response = await axios.get(`/user/verify-email/${token}`, {
|
||||||
withCredentials: true,
|
withCredentials: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ export const useAuthStore = defineStore("auth", () => {
|
|||||||
|
|
||||||
const getUserStats = async () => {
|
const getUserStats = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await axios.get("/api/user/stats", {
|
const response = await axios.get("/user/stats", {
|
||||||
withCredentials: true,
|
withCredentials: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ export const useAuthStore = defineStore("auth", () => {
|
|||||||
|
|
||||||
const getBalance = async () => {
|
const getBalance = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await axios.get("/api/user/balance", {
|
const response = await axios.get("/user/balance", {
|
||||||
withCredentials: true,
|
withCredentials: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user