I have an HTML checkmark group that looks like this:
Show:
[ ] New
[ ] Regulars
[ ] Veterans
In my javascript code, I use Axios to connect to a .Net API like this:
const fetchGamerTags = async (showNew, showRegulars, showVeterans) => {
let apiAddress = "";
if (showNew) {
apiAddress = "api/tags/GetNew/"
} else if (showRegulars) {
apiAddress = "api/tags/GetRegulars/"
} else if (showVeterans) {
apiAddress = "api/tags/GetVeterans/"
} else {
apiAddress = "api/tags/GetAll/"
}
const result = await axios(apiAddress, {
params: {
isDeleted: false
}
});
My problem is, I don't know how to handle if a user selects multiple choices...like New and Veterans. Is there a way to handle that in my javascript?
Thanks!