Fixed query params

This commit is contained in:
Mike 2019-09-05 11:37:52 +01:00
parent a0ad82ffba
commit 5a2d91c515
1 changed files with 7 additions and 3 deletions
src/api

View File

@ -3,9 +3,13 @@ import store from '../store/modules/settings.js'
const apiUrl = 'https://users.service.development.therig.onlinefuelslabs.io'
export function fetchList() {
return axios.get(`${apiUrl}/account/search?page=1&limit=2000&platform=${store.state.platform}`)
// temporary fix. It seems query parameters are not going trhough as intended. Will have to look at backend?
export function fetchList(query) {
const dto = {
'page': query.page,
'limit': query.limit,
'platform': query.platform || store.state.platform
}
return axios.get(`${apiUrl}/account/search`, { params: dto })
}
export function fetchAccount(id) {