Closed mahrsbar closed 2 years ago
@teakopp and I discussed this earlier this week and saw no reason why we shouldn't do this. 👍🏻
I'd like to work on this one!
@mahrsbar There needs to be a corresponding PR that needs to be made to the front end repo for this -- do we have an issue there for it?
This is complete, https://github.com/ProgramEquity/amplify-back-end/pull/210. Sorry should be closed.
Hello, I was wondering if it would be better to combine the addressVerification and createAddress into one so the front-end only needs to make one API call.
Currently, front-end has to send a POST request with the address to addressVerification, receive a successful response, then send another POST request with the verified address to createAddress, then receive an address_id which then can be used to make a POST request to createLetter.
I can write this logic in the front-end but I think best practices would be having the addressVerification and createAddress as one call in which it would return the address_id to front-end which can then be used to createLetter.
If there is a reason we're two doing two calls, please let me know because I might have missed something. I hope my ask makes sense.
I'm referencing the following code in this file:
CreateAddress
addressVerification