Giter Club home page Giter Club logo

Comments (1)

nplutt avatar nplutt commented on July 1, 2024

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.

  1. 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.
  2. 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

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.