So let's continue with remove method.
It's also very easy.
For by id and list.
We just need to boost the ID over here.
Okay.
If we don't see the box.
Around a new file extension, we will use, but not file.
Here I say string.
Is a controller.
So.
Now let's say.
Oh, sorry.
Generally.
Method.
And what about turbo?
In.
USA we have got an internal server error.
First of all, we will fix this error.
But right now let me have the incorrect MongoDB database.
You will say the boss will be not far.
Right.
If we remove the invalid.
Invalid.
And.
Run!
Now it is all set.
But if you boost the invalid MongoDB MongoDB ID, you say we got the internal server error, right?
You were here.
So how we can fix that?
Well, in order to fix that, we can create the pies in order to feed us.
Okay.
For example, is that a box controller over here?
These are here.
Let me look at the file from the documentation.
Right here you can say is here I want to boost the pie over here for example like pass.
Through.
Our mask object or something like that.
Okay.
I want to build a custom buys.
Right.
Right here.
Let's click into the custom bar.
Click copy ability.
And inside here right we want.
My.
Past.
Dot bars.
Dot the s and remove everything right here.
Alright.
Right here.
We need to check if the value.
The value over here will be always true, right?
We need to check if the values right here.
If this object.
Okay we will have a one.
What it will be is valid object from mongoose.
We can move the value over here.
If it's not valid we will throw new exception whereby.
The object any.
Person.
Okay, so the last and if it works we will throw.
We will return a value.
Let me say right here we will import.
The boss or actually we already have a boss object ID pi come from the edges comma.
Right.
But right now let me test my custom.
Okay.
Let me test my custom to say.
If I would invalid, I will say, uh, we already viewed us wrong.
Why?
Right.
Because it is not In Wales we built around.
Okay.
Let me test again.
Okay.
So the object is in wireless, right?
Very very cool.
And if you use this correctly.
It will work.
Also we already remove that.
Right here.
We don't need to restart anything right.
We can use the bus object and everywhere where we have the ID.
Okay.
So that is.
Just for the video.
And actually we can use the viewing object from the JS okay.
But you got the idea right.
So I will see you in the next one.