Comments (1)
Unfortunately I don't have a great way to run the API locally outside of my account. I'll look at creating a test harness around the API or migrating the Terraform into this repo to make it easier for other people to work on.
It could probably broken down into a two smaller pieces of work.
-
Create an endpoint, maybe something like a
POST
to/user/manage_preferences
- Accepts a JSON body with an
email
field - Look up the user by
email
using the fetch_user function - If the user exists send them an email using the send_emails_to_users function
- Create a new EmailTemplate that says, "Hello, press the button below to manage your notification preferences." and then has a button to link back to the preferences page. Similar to how the welcome and new appointment emails are setup.
- Accepts a JSON body with an
-
Update the preferences page to display a form that accepts an email and calls the new endpoint if:
- There isn't a
token
query param in the URL - Or the API errors out when trying to load the user's notification preferences
- There isn't a
If you have any better ideas for what the route should be, I'm all for it. Non restful endpoints like this are always a pain to name haha.
from vaccine-availability-notifications.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vaccine-availability-notifications.