Basically, let's suppose an application that manage some user's meetings.
I have a filtering zone on a page that aims to specify the category of items I need to specifically return.
Supposing two kind of filters:
- Retrieving my actual meetings (meetings currently occurring or planned in the near future)
- Retrieving my past meetings (meetings that are already past)
I think of passing a kind of url parameter like this:
Indeed, I can't have both
past in the same call since it would not be appropriate for the listing.
So in my server side, I would handle through a simple conditional the passed value to filter the query.
Is it right enough to pass a
string like this (
actual) or is there a better practice to handle this case?
Note that by default, meaning without filtering, all meetings are returned.