Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search store #9

Merged
merged 9 commits into from
Mar 11, 2019
Merged

Search store #9

merged 9 commits into from
Mar 11, 2019

Conversation

RobStallion
Copy link
Member

#8 #1

  • Caches the dummy data being used as store info in ets on application start up
  • Allows user to enter a postcode and distance to search within to filter stores.
  • Validates postcode with postcodes.io

@@ -18,4 +8,14 @@ defmodule StoreFinder.Haversine do
else: acc
end, [], :store_cache)
end

defp calc_distance({lat1, long1}, {lat2, long2}) do
v = :math.pi / 180
Copy link
Member

Choose a reason for hiding this comment

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

please consider expanding the variable names for clarity (or adding in-line comments).

Copy link
Member

@nelsonic nelsonic left a comment

Choose a reason for hiding this comment

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

@RobStallion nice work! 👍

@nelsonic nelsonic merged commit 5ddaf6c into master Mar 11, 2019
@nelsonic nelsonic deleted the search-store branch March 11, 2019 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants