Created statistics personal and general

This commit is contained in:
Edd
2025-12-31 23:57:54 +00:00
parent 45d8aa0035
commit 16f8d3bdfc
4 changed files with 240 additions and 25 deletions
+14
View File
@@ -102,6 +102,18 @@ export const useAPIStore = defineStore('api', () => {
return axios.get(`${API_BASE_URL}/users/${authStore.currentUserID}/transactions?${queryParams}`)
}
const getLeaderboard = (params = {}) => {
const queryParams = new URLSearchParams({
page: params.page || 1,
}).toString()
return axios.get(`${API_BASE_URL}/leaderboard?${queryParams}`)
}
const getCurrentUserStats = () => {
return axios.get(`${API_BASE_URL}/statistics/me`)
}
return {
postLogin,
postLogout,
@@ -109,6 +121,8 @@ export const useAPIStore = defineStore('api', () => {
getGames,
getCurrentUserMatches,
getCurrentUserTransactions,
getCurrentUserStats,
getLeaderboard,
gameQueryParameters,
}
})