zerobase-io / smart-tracing-api

Backend/DB/API repository for the Zerobase platform
Apache License 2.0
6 stars 9 forks source link

Check-in Location Update: Correct Behavior #54

Open toadzky opened 4 years ago

toadzky commented 4 years ago

Right now, the endpoint just sets the provided lat/long on the check-in.

The correct process, as defined by product, is:

  1. Get the lat/long of the scannable's site.
  2. If site has no location, do nothing.
  3. Compare provided lat/long and site's lat/long..
    1. If within some configurable range...
    2. copy the site's lat/long to the scan relationship
    3. set the verified flag property to true on the scan relationship
    4. Else, set the verified flag property to false on the scan relationship