Welcome back.
Let us finish the API development before we get to front end.
So let's revisit the user controller.
For the user controller.
We are done with the user registration log in and then the profile.
But for the profile, we like something here.
Let me show you.
Let's make a request to the profile end point which is under users.
And then the profile when I make the request.
Now let's have a look.
You can see that we have the account, but inside the account we have the transactions, which is this
one.
And for this one we are seeing the IDs of the transaction.
But when you make a request from the front end, you want to see the transactions, know the IDs.
Because of that, let's go ahead and then populate this transaction.
So back to the users controller and under profile, let's expand that and you can see the way we are
populating the accounts in this way.
Like I said, if you go by this way, we can populate nested IDs as you see inside the profile here.
So for this one, we are going to use a populate inside that.
So here we bring in populate.
And going to be an object.
And then you specify the path and the path for this one going to be the transactions.
And then we specify the model for this one and for this one, it's going to be the transaction.
So with this one, let's save it and let's make a request and let's check it out.
And here we go.
You can see that inside the account.
We have the transaction and instead of the IDs, we have the real object of the transaction.
All right.
So in this video, let's go ahead and then implement how we can update a user.