I have a case where I need to expose the following server routes:
/cats/:catId /cats?name=:name
How should my server routes look? I tired this:
app.route('/cats/:catId')
.get(cats.read)
app.route('/cats?name=:name')
.get(cats.getByName)
But that doesn't work. I seem to get routed to /cats in that case.
Should I have a route like this, or should I just do a switch in my server controller to handle the query strings as appropriate?