DEV Community

Discussion on: Handling async await

Collapse
lukaszahradnik profile image
Lukáš Zahradník • Edited on

Why cannot be function _verifyUser async?
Just make it async and await _verifyEmail.

Collapse
itssimondev profile image
Simone Aronica Author

Because that would require enormous updates in my codebase as this function is contained into a _saveUser function that is contained into a _createUser function that returns to the express router the status code to return to the client through HTTP

Collapse
lukaszahradnik profile image
Lukáš Zahradník

It would require only adding async keyword to your functions and awaiting these async functions.