g0v / vaccinate

vaxx.tw is a tool to find COVID-19 Vaccine Appointments near you
http://vaxx.tw
MIT License
33 stars 20 forks source link

Modify hospitals via API. #80

Closed kevinjcliao closed 3 years ago

kevinjcliao commented 3 years ago

Context:

This PR:

  1. Adds an API endpoint "/hospital" that takes POST requests that update the hospital.
  2. Adds two env variables: API_URL and API_KEY to determine whether or not a request is accepted by the app, and what URL that local_scraper sends requests to.
  3. Modifies local_scraper to send post requests instead of updating Redis instance directly.

Test plan: With the instance API_URL set to localhost:5000 locally, and a locally generated API key, confirm everything is working.