In this video.
Let's test the endpoint that we created in the previous video.
So here that is for the ten lines.
Click on that and click on collections for this one is going to represent each model for our purpose.
We have three models, posts, users and comments, so let's create one folder for each model.
So I'll click on that and name this one as users.
The next collection is going to be post and lastly, it's going to be comments.
So let's start with the user.
So let me collapse this one and here I'm going to add requests and I would name this one as registered.
And if you have used Postman before, it looks the same, but this one looks cleaner because the interface
is really simple.
All right, so let's change the method to post and then the you are going to be a tt p column for slide
four slash Luca host and then Colon 9000.
Then first, like the endpoint when I be the API version one, let's start from the users, which is
this API version one users and register so I can copy this one and here I'm going to paste that.
All right.
So when I hit send, you can see that I go back the response, so I will save it by clicking on command
S or control S And let me add the log in also.
So I'll right click and then duplicate and change this one to look in.
And the end point here is look, in its end, where there is no endpoint for look in, I believe within
either one or sorry, I need to add the forward slash here and send we have look in the next one is
going to be single user.
So here I'm going to duplicate this one.
And Renee, I would change this one to details.
And for this, it's going to be get requests and force like some random ID.
So our hit send, I have it.
The next one is going to be the profile.
So.
Let me collapse this one, and here I'm going to duplicate this one.
And change this one to profile.
And then here we're going to be forced slash profile and then the ID and I have it.
The next one is going to be the upload.
So let me copy this one as that profile photo upload.
So here.
Duplicate this one.
And change this one to profile image upload.
And the end point is this.
Four west large file photo upload and some ID, so let me use any ID here when I be put request.
And I have it is that the next endpoint is going to be uploading the cover image.
So here.
So let me change this one to cover image upload.
All right, so inside the tender client, let me duplicate this one and change this one to cover photo
upload.
And change this one to cover.
And it's st.
I have it down here.
The next is the password.
So I would copy this one also and duplicate this one.
And change this one to update password.
And let me paste here as that and hit send.
Well, let me check the update is put request.
Yeah, we have it api.
Oh sorry.
I need to remove this one from here.
Oh right.
So let's hit send better.
So we have the same error API users.
Oh sorry.
Remove this one API four.
Slash this.
All right.
It worked.
So let's look at the update.
So we already are the update of a user so we can go ahead and then add that one.
So let me copy this one and down here.
And I would change this one to use an update or update for a slash ID And here is going to be update
and here, user update.
All right.
So let me come back here and duplicate this one.
Rename.
And user update.
So we're going to be as updates with some ID and we have it down here.
All right.
That is it about the user.
So let's start with the Post.
Sorry.
The next one going to be the log out.
So let me add one here for look out.
Sorry.
Look out.
And it's gets requests.
So we're going to be users and look out.
All right.
So that is it about the uses.
So let's collapse this once and let's start with the post.
So let me collapse this collection and for post, let me add one request.
And going to be as great.
And let me copy the you are here and for post let me paste it here as that and change this one to post
and going to be as post.
There you go.
And let me duplicate this one.
All posts is get requests.
It's sent.
There you go.
Let me collapse a little bit.
Something like this.
And this one going to be the details about the post.
So here for a slash, some ID and there we go.
The next is.
Delete posts and difference.
Here is a method delete, save.
And there we go.
Next is update.
Difference.
Here is a method put.
And there you go.
All right.
That is it about the post.
The next one going to be the comments.
So our copy that you are and collapse all the opening tops and inside the comments.
Let me add one request.
Create.
And pace that here is going to be comments and is post requests.
All right.
Next, a single comment.
I'm going to be single and here for a slice, some ID and get.
And there we go.
The next is update.
Difference here is the method and we have it.
And lastly, it's about delete.
And difference here is the method, and that is the delete.
Now that we have all the endpoint work in the next video, let's go ahead and then refactor this code
to use what is called express routing.