cds-snc / covid-alert-server

Exposure Notification: Diagnosis Server implementation / Notification d’exposition : Mise en œuvre du serveur de diagnostic
Apache License 2.0
298 stars 31 forks source link

Endpoint for Clearing Diagnosis Keys in Database #331

Closed CalvinRodo closed 3 years ago

CalvinRodo commented 3 years ago

PLEASE NOTE: This would be used in the staging environment only for QA Purposes only

This end point when called with an API Key should trunc the diagnosis_keys table

maxneuvians commented 3 years ago

You can add a:

if os.Getenv("ENV") == "staging" {

like we used here:

https://github.com/cds-snc/covid-alert-server/pull/235/files#diff-0d7a816670026797c98bbe0113a27eee86e6cc27f73f4e1fdd79995503105890R33-R36

CalvinRodo commented 3 years ago

That was the plan, I also want to add a check in the prod repo to fail merges if environment is set to anything but production, and possibly an alarm in AWS as well.