OpenPolytechnicBITProjectGroup / Musician-Venue_App

Repo for the Musician-Venue WebApp
1 stars 0 forks source link

Fixed search #38

Closed ttocskcaj closed 7 years ago

ttocskcaj commented 7 years ago

Fixes #36 and adds ability to search for venues by location

lxdnz254 commented 7 years ago

Add a test to the test suite

lxdnz254 commented 7 years ago

Change the 'it' descriptions to match what the test is doing I.e "genre query should return an array"

lxdnz254 commented 7 years ago

What about displaying a message to the end user when status 501 is returned, i.e. "No search query entered!!"

ttocskcaj commented 7 years ago

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 😆

lxdnz254 commented 7 years ago

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

ttocskcaj commented 7 years ago

I have a cool js validation library I wrote for an old project somewhere. We can adapt that if you want?

lxdnz254 commented 7 years ago

Yeah cool, existing libraries are great, less code writing.. does it extend to form validation as that would be useful too

ttocskcaj commented 7 years ago

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

lxdnz254 commented 7 years ago

All good then, merge away