opentrace-community / opentrace-cloud-functions

OpenTrace Cloud Functions. Reference implementation of the BlueTrace protocol.
https://bluetrace.io
GNU General Public License v3.0
273 stars 121 forks source link

Unsure about how Firestore needs to store upload keys #21

Closed rburhum closed 4 years ago

rburhum commented 4 years ago

Got everything working, except that when I try to upload data, this function fails

https://github.com/opentrace-community/opentrace-cloud-functions/blob/d4737ff53ea6a16baa3fd0184a61c4314804ac44/functions/src/opentrace/getUploadToken.ts#L17

I tried mocking some data in firestore (and am using the default PinGenerator() - have not sub-classed it yet). Not very familiar with Firestore - is there some guidance on what the flow should be like and how to create the entities in firestore so this works?

qtangs commented 4 years ago

@rburhum, please see my note on storeUploadCodes here: https://github.com/opentrace-community/opentrace-cloud-functions/issues/9#issuecomment-614786773

Also take note that the handshake pin and the upload code are 2 entirely different things: https://github.com/opentrace-community/opentrace-cloud-functions/issues/17#issuecomment-615859371

rburhum commented 4 years ago

Saw it and got it working by creating a script that calls storeUploadCodes. Thank you!