1
00:00:00,440 --> 00:00:07,010
In this video, we are going to populate the real comments instead of the IDs.

2
00:00:07,010 --> 00:00:10,730
So let's make a request to find or post.

3
00:00:10,730 --> 00:00:12,890
And this is the end point.

4
00:00:12,890 --> 00:00:14,030
When I hit send.

5
00:00:14,030 --> 00:00:15,110
Let's have a look.

6
00:00:15,650 --> 00:00:19,310
You can see that this post has two comments.

7
00:00:19,310 --> 00:00:19,970
Which is it?

8
00:00:19,970 --> 00:00:23,330
So let's go ahead and populate the real comment.

9
00:00:23,330 --> 00:00:31,250
So let's get into the controllers of post, which is this Let's locate finding all post, which is this.

10
00:00:31,250 --> 00:00:37,370
So here we can add populate on that and the field is called comment.

11
00:00:38,330 --> 00:00:42,650
I also want to populate when a user find a single post.

12
00:00:42,650 --> 00:00:48,080
So this one too, I'm going to change with that and that is it.

13
00:00:48,080 --> 00:00:52,040
So if I hit send again, let's have a look.

14
00:00:53,940 --> 00:00:55,920
You can see instead of IEDs.

15
00:00:55,920 --> 00:00:58,560
Now we have the rare comment.

16
00:00:58,560 --> 00:01:06,100
And if I find a single post, I'll be able to see all the comments for this post.

17
00:01:06,120 --> 00:01:09,120
It doesn't exist, meaning that it has been deleted.

18
00:01:09,120 --> 00:01:16,020
So let me find the first one for CSIS and let me pass in the ID and hit send.

19
00:01:16,940 --> 00:01:20,000
And you can see that you go back a single post.

20
00:01:20,000 --> 00:01:26,480
And when that we have the comment, let's also populate the comments on the user profile.

21
00:01:26,480 --> 00:01:35,350
So controllers for users and let's look at the profile, which is this and let's also populate the comment.

22
00:01:35,360 --> 00:01:41,000
We can change as many populate as you want going to be as comments.

23
00:01:41,000 --> 00:01:47,960
So let's go ahead and make a request to find this profile of the user and let's have a look.

24
00:01:48,660 --> 00:01:52,290
You can see this user has created these posts.

25
00:01:52,290 --> 00:01:54,300
And let's look at the comments also.

26
00:01:54,300 --> 00:01:57,750
And this user has also created a comment.

27
00:01:57,750 --> 00:02:05,370
So that is it about the populate the next video, let's create a controller to delete a comment.

