Making a call from the frontend to an api that I do not have access to.
Would like to filter the table of users shown on the page based on their Admin status. The call I am making looks this
axios.get('/users?admin=true')
.then(r => { this.$store.commit(USER_TABLE, r.data) })
This works fine to show all the users that have admin status. But whenever I try to do another filtering to show users with no admin status, it does not work. users?admin=false
. It seems that as long as admin
is the API request link, it will return admin users. When I omit from the request link, I get all the users.
Any idea why this is happening? how can I only get non-admins if sers?admin=false
does not work??