hackforla / HomeUniteUs

We're working with community non-profits who have a Host Home or empty bedrooms initiative to develop a workflow management tool to make the process scalable (across all providers), reduce institutional bias, and effectively capture data.
https://homeunite.us/
GNU General Public License v2.0
35 stars 21 forks source link

565 signup failure rollback #671

Closed JpadillaCoding closed 1 day ago

JpadillaCoding commented 1 month ago

Closes #565

What changes did you make?

What did you learn or can share that is new?

Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)

Visuals before changes are applied ![image](Paste_Your_Image_Link_Here_After_Attaching_Files)
Visuals after changes are applied ![image](Paste_Your_Image_Link_Here_After_Attaching_Files)
JpadillaCoding commented 1 month ago

@Joshua-Douglas I took your advice and used remove_user to avoid duplicate logic. To avoid the errors you mentioned and to also make the function more flexible for future uses, I made the deletion from cognito and the DB separate by specifying which to do on the parameters. I also set deleting from both as default as most use cases would call for the deletion of both. Let me know what you think of this approach.

As far as the test you provided, it worked fine as is and didn't need any modifications. The test failed without remove_user implemented on the case errors and passed after it was implemented.

Thanks!

JpadillaCoding commented 3 weeks ago

@tylerthome @paulespinosa @Joshua-Douglas Hey all. Thanks for your feedback! I've addressed the concerns pointed out 😄