Skip to content
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.

2️⃣0️⃣ 50 miles is too far to travel #15

Merged
merged 4 commits into from
Dec 8, 2016

Conversation

st3v3nhunt
Copy link
Contributor

@st3v3nhunt st3v3nhunt commented Dec 7, 2016

I've not done any error checking on the additional variable of how far the search is going to be. The reason for this is that there is currently a duplication in the validation - both the middleware and the lib are doing it. There is no need for this to be the case. I'm going to refactor the duplication out and have the middleware be responsible for validation and setting defaults. Then the lib can concentrate on doing the calculations based on the assumption the inputs are good

@st3v3nhunt st3v3nhunt temporarily deployed to nearby-services-api-pr-15 December 7, 2016 15:45 Inactive
@@ -0,0 +1 @@
{ "metersInAMile": 1609 }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd argue that the API should be metric and it is the responsibility of the client to do the necessary conversion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, something to change in the future #19

⬇️ Reduce the number of results returned
@neilbmclaughlin neilbmclaughlin temporarily deployed to nearby-services-api-pr-15 December 8, 2016 08:59 Inactive
@neilbmclaughlin neilbmclaughlin merged commit 3c46319 into master Dec 8, 2016
@neilbmclaughlin neilbmclaughlin deleted the feature/search-distance branch December 8, 2016 13:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants