-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MNTOR-1800: unsubscribe from free monthly report #4988
Conversation
Preview URL 🚀 : https://blurts-server-pr-4988-mgjlpikfea-uk.a.run.app |
MNTOR-1800: Part 3 - unsub emails endpoint and generate link util function
MNTOR-3584: set monthly report to true when user subs to plus
Yea I thought about that too. I think it might be simpler to not have this dup field and just always do join... but it's going to be annoying since we need to request with email as a param often... and it's going to take a performance hit We can also create a VIEW with these two tables.. that's probably what we should've done with |
Since the user is not logged in, there is no extra information given by passing in the email address, but it does add PII to our request logs. Hence, just accepting the unsubscribe token might be enough.
Only require token when unsubscribing
Cleanup completed - database 'blurts-server-pr-4988' destroyed, cloud run service 'blurts-server-pr-4988' destroyed |
References:
Jira: MNTOR-3582
Description
Util function for table
subscriber_email_preferences
The util funcs take care of the fetches and updates of email preferences. It gets the stored settings from 2 tables and consolidate them. Follow up work will be tracked in MNTOR-3557
Util function to generate unsubscribe URL
API endpoint to verify unsub url and unsub the user from monthly monitor reports
Screenshot (if applicable)
Not applicable.
How to test
console.info(generateUnsubscribeLink(session?.user.email || ""));
on any pagemonthly_monitor_report_free
value and change it to false if notChecklist (Definition of Done)