zerobase-io / smart-tracing

Privacy-First Contact Tracing to Keep Communities Safe
https://zerobase.io
Apache License 2.0
27 stars 13 forks source link

undefined deviceID, updates API to handle null states #231

Closed JohnCLo closed 4 years ago

JohnCLo commented 4 years ago

Resolves some misalignment issues with the new API:

  1. create originally returned id as an object id:{value: string}, updated to create id:string

  2. undefined was originally converted to string and inserted into localstorage. This would later cause an error on scanning since deviceID would be "undefined". This PR first checks if deviceID is currently ==="undefined" if so, assigns a new valid deviceID

  3. creating new user and new checkin had null values which conflicts with gremlin setup, we resolve this by passing an empty string as part of the complete object. Subsequent work would include gremlin defining which fields are optional or not and better error responses.

JohnCLo commented 4 years ago

@jasonspriggs won't merge until staging is back up again. Thanks