hack4impact-utk / compassion-ministries

https://compassion-ministries.vercel.app
1 stars 2 forks source link

283 create api endpointserver func to delete allowed logins #345

Closed ethanhmaness closed 5 months ago

ethanhmaness commented 5 months ago

Description

Added removeAllowedEmail() in src/server/actions/Setting.ts which removes an email from the allowed emails list in the settings document and deletes a user if there is a user associated with that email. Added API endpoint at DELETE /api/settings/emails and associated zod types to call removeAllowedEmail().

Relevant issue(s)

283

Questions

Should this include authorization? Do we want to move this to Settings.ts?

Type of change

Checklist:

To test

Log in as an admin and hit DELETE /api/settings/emails?email=<email to delete>.

vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
compassion-ministries ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 29, 2024 8:54pm