1
00:00:07,060 --> 00:00:08,440
Welcome back.

2
00:00:08,710 --> 00:00:14,050
Let us finish the API development before we get to front end.

3
00:00:14,050 --> 00:00:17,890
So let's revisit the user controller.

4
00:00:18,040 --> 00:00:19,560
For the user controller.

5
00:00:19,570 --> 00:00:25,720
We are done with the user registration log in and then the profile.

6
00:00:25,810 --> 00:00:29,320
But for the profile, we like something here.

7
00:00:29,350 --> 00:00:30,430
Let me show you.

8
00:00:30,460 --> 00:00:35,170
Let's make a request to the profile end point which is under users.

9
00:00:35,170 --> 00:00:38,590
And then the profile when I make the request.

10
00:00:38,620 --> 00:00:40,300
Now let's have a look.

11
00:00:40,600 --> 00:00:49,000
You can see that we have the account, but inside the account we have the transactions, which is this

12
00:00:49,000 --> 00:00:49,540
one.

13
00:00:49,540 --> 00:00:54,340
And for this one we are seeing the IDs of the transaction.

14
00:00:54,340 --> 00:01:00,280
But when you make a request from the front end, you want to see the transactions, know the IDs.

15
00:01:00,280 --> 00:01:05,080
Because of that, let's go ahead and then populate this transaction.

16
00:01:05,080 --> 00:01:13,030
So back to the users controller and under profile, let's expand that and you can see the way we are

17
00:01:13,030 --> 00:01:15,670
populating the accounts in this way.

18
00:01:15,700 --> 00:01:24,400
Like I said, if you go by this way, we can populate nested IDs as you see inside the profile here.

19
00:01:24,730 --> 00:01:29,530
So for this one, we are going to use a populate inside that.

20
00:01:29,710 --> 00:01:32,620
So here we bring in populate.

21
00:01:33,730 --> 00:01:35,950
And going to be an object.

22
00:01:35,950 --> 00:01:42,670
And then you specify the path and the path for this one going to be the transactions.

23
00:01:43,030 --> 00:01:50,440
And then we specify the model for this one and for this one, it's going to be the transaction.

24
00:01:50,860 --> 00:01:55,990
So with this one, let's save it and let's make a request and let's check it out.

25
00:01:55,990 --> 00:01:58,060
And here we go.

26
00:01:58,180 --> 00:02:01,270
You can see that inside the account.

27
00:02:01,270 --> 00:02:08,740
We have the transaction and instead of the IDs, we have the real object of the transaction.

28
00:02:08,919 --> 00:02:09,460
All right.

29
00:02:09,460 --> 00:02:15,850
So in this video, let's go ahead and then implement how we can update a user.

