In this video, let's create a controller to find all posts So inside the controllers, which is this.
And here we go.
Let's collapse this.
And this is a controller.
Let me pass in next here and inside here.
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
going to have one.
So going to be pretty simple.
That is const post is equal to a wait post model.
Don't fight, and that is it.
Lastly, let's send the post.
As opposed.
All right, So inside the crates, let's make sure we are returning the actual error here.
So next, then the app error and you pass in the error message.
So let's go ahead and make the request to find your post.
So let me collapse the finished ones.
Perfect.
So ten lines.
Oh, and hit send.
Great.
And we have all the posts that we have created so far in our application.
Then this video, let's create a controller to delete a post.