registracional jol navigal a loginra

This commit is contained in:
2025-10-20 18:56:38 +02:00
parent bfe977d35b
commit 23c4b838d4
2 changed files with 15 additions and 16 deletions
+4 -14
View File
@@ -1,7 +1,7 @@
import axios from "axios"
export const API_CONFIG = {
baseURL: (import.meta.env.VITE_API_URL ? import.meta.env.VITE_API_URL : '') + "/api",
baseURL: (import.meta.env.VITE_API_URL ? import.meta.env.VITE_API_URL : "") + "/api",
wsURL: "http://localhost:3000",
timeout: 10000,
retryAttempts: 3,
@@ -12,9 +12,9 @@ export const apiClient = axios.create({
timeout: API_CONFIG.timeout,
withCredentials: true, // Important for cookie-based auth
headers: {
'Content-Type': 'application/json'
}
});
"Content-Type": "application/json",
},
})
//login
export const login = async (username, password) => {
@@ -36,16 +36,6 @@ export const register = async (username, email, password, fname, lname, phone) =
}
}
//verify email
export const verifyEmail = async (token) => {
try {
const response = await apiClient.get(`/users/verify-email/${token}`)
return response.data
} catch (error) {
throw error
}
}
// Get current user's game statistics
export const getUserStats = async () => {
try {