zrcadlo / undercurrent_api

The Backend of your Dreams: API for dream recording app
0 stars 0 forks source link

Location as a JSON attribute of users and dreams #23

Closed lfborjas closed 4 years ago

lfborjas commented 4 years ago

Resolves #17

Introduces two types: Location, for internal use, with city, region, country and lat/lng. And APILocation, which corresponds to a concrete location type from the vendor we choose (in this PR, a Suggestion from Algolia Places). This proves to be a useful distinction, and the parsing function is very simple -- however, it does feel a bit awkward that dreamer_location coming in, when creating dreams, is expected to be the latter of those, but going out it's the former. 🤔