1
00:00:00,550 --> 00:00:07,930
In this video, let's create a controller to find all posts So inside the controllers, which is this.

2
00:00:07,930 --> 00:00:09,310
And here we go.

3
00:00:09,580 --> 00:00:11,020
Let's collapse this.

4
00:00:11,020 --> 00:00:12,910
And this is a controller.

5
00:00:12,910 --> 00:00:17,680
Let me pass in next here and inside here.

6
00:00:17,680 --> 00:00:24,940
I'm going to make use of next and I'll pass in the app error and then the actual message in case you're

7
00:00:24,940 --> 00:00:25,930
going to have one.

8
00:00:26,200 --> 00:00:28,090
So going to be pretty simple.

9
00:00:28,090 --> 00:00:34,270
That is const post is equal to a wait post model.

10
00:00:36,380 --> 00:00:39,320
Don't fight, and that is it.

11
00:00:39,350 --> 00:00:42,410
Lastly, let's send the post.

12
00:00:43,710 --> 00:00:45,570
As opposed.

13
00:00:46,630 --> 00:00:52,270
All right, So inside the crates, let's make sure we are returning the actual error here.

14
00:00:52,300 --> 00:01:00,100
So next, then the app error and you pass in the error message.

15
00:01:01,420 --> 00:01:04,840
So let's go ahead and make the request to find your post.

16
00:01:04,840 --> 00:01:07,180
So let me collapse the finished ones.

17
00:01:08,700 --> 00:01:09,210
Perfect.

18
00:01:09,210 --> 00:01:11,310
So ten lines.

19
00:01:11,340 --> 00:01:13,110
Oh, and hit send.

20
00:01:13,710 --> 00:01:14,130
Great.

21
00:01:14,130 --> 00:01:18,900
And we have all the posts that we have created so far in our application.

22
00:01:19,110 --> 00:01:22,920
Then this video, let's create a controller to delete a post.

