fix:user profile match table sort
This commit is contained in:
@@ -174,19 +174,16 @@ export const useAPIStore = defineStore('api', () => {
|
||||
...(params.sort_direction == 'asc' && { sort_direction: 'asc' }),
|
||||
...(params.type && { type: params.type }),
|
||||
}).toString()
|
||||
|
||||
|
||||
return axios.get(`${API_BASE_URL}/games?${queryParams}`)
|
||||
}
|
||||
|
||||
const getAdminMatches = (params = {}) => {
|
||||
const queryParams = new URLSearchParams({
|
||||
page: params.page || 1,
|
||||
...(params.sort_direction == 'asc' && { sort_direction: 'asc' }),
|
||||
...(params.type && { type: params.type }),
|
||||
...(params.outcome && { outcome: params.outcome }),
|
||||
...(params.date_from && { date_from: params.date_from }),
|
||||
...(params.date_to && { date_to: params.date_to }),
|
||||
sort_by: params.sort_by || 'began_at',
|
||||
sort_direction: params.sort_direction || 'desc',
|
||||
...(params.pot && { pot: params.pot }),
|
||||
}).toString()
|
||||
|
||||
return axios.get(`${API_BASE_URL}/matches?${queryParams}`)
|
||||
|
||||
Reference in New Issue
Block a user