Closed ttocskcaj closed 7 years ago
Add a test to the test suite
Change the 'it' descriptions to match what the test is doing I.e "genre query should return an array"
What about displaying a message to the end user when status 501 is returned, i.e. "No search query entered!!"
That may not be needed. We could just use js validation to check if there's something in the form before it's allowed to be submitted. I.E. Check before it's sent, not after a message is returned.
I don't think there's a need for the API to return a message other than the HTTP status code. Anyone not using the form to submit a search is using it wrong anyway 😆
Yep, validate the search data before sending. I.e. pressing search button with nothing selected will result in the message being displayed client side, no http call to server
I have a cool js validation library I wrote for an old project somewhere. We can adapt that if you want?
Yeah cool, existing libraries are great, less code writing.. does it extend to form validation as that would be useful too
Yeah, that's what I was meaning. It's for form validation not server-side. It's a jQuery plugin. I'll dig it up later
All good then, merge away
Fixes #36 and adds ability to search for venues by location