Created statistics personal and general
This commit is contained in:
@@ -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,
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user