I created a function that returns Promise
ject
i can access the response's data inside the scoop of the 'then' accessor and read it's value there, but outside the data is not being attributed to the 'User' object so it's returning this error :
>Uncaught (in promise): TypeError: Cannot read property 'firstName' of undefined