Hi everyone!
After we already have a service to ask the reaction, we need a service to remove the reaction.
Okay, so in this video let me write us revoke reaction.
Okay.
We also need the little and current users.
Okay.
Right here in the remove reaction we only need the boss okay.
We don't care about the the ties.
Right.
We don't care the ties right now.
Let's do that.
I will copy into the Intruder.
Remote.
Reaction.
Okay.
Remove the tile here and remove unused import statement.
Right here.
I need to remove reaction video.
By current users.
Okay.
Right now I want to build a similar right here.
We need to find the soft stop like that.
Let me copy.
And both over here.
The boss for the boss.
Has it been Okay.
Right now, if we.
Don't file the existing reaction, we will return directly over here.
We will not do anything because right here it means way down reaction to the boss.
Okay?
It means we don't care about us.
But if we find the existing reaction, we need to delete the reaction document.
So for that reason in this guy I need to create a service over here insert remove I will create.
The remove right.
I will call this lesson model file one.
And.
Released.
Let me see.
Is it done?
Okay.
Right now I just need to go file by ID and delete and boost the ID over here.
And make sure we check.
And we don't see anything
Right here.
I will call this dot.
Reaction.
Solve it.
Dot.
Remove.
Okay.
Right here we need to boost the ID.
We need to look up the existing reaction .10.3
okay.
With this guy it will remove the question.
And we need to discretize the boss schema also.
Right.
We need to do that.
Right here we will run the logic to update boss model profile.
By Finally.
And right here we need to boost robust ID.
Right here.
Or we can boost over here.
Okay.
You can use whatever you want.
Although we need to boost the boss ID and we need to.
Discrete by one.
Right.
I can use the increase one over here.
With the.
Reaction Cao.
With the field okay.
The field right here.
Reaction.
Cao.
And in order to discourage the camera here.
We need to know.
Uh, let let let me show you what I mean.
Right here.
I will put over here.
Um, we also call dot.
Dot exiting reaction.
Dot time.
I will minus.
Right here will minus one okay.
We will use the increment operator.
So minus the current.
Okay.
We will based on the the current value and minus one into the property.
Okay.
This is the how we can access Into the property inside the body because the reaction coil is an object.
Right from the object we can use the like or we.
Okay.
We want to describe the last few.
Right.
For that reason we need to inject the embedded string last so we will await us right.
And now let's test it.
I will change my playlist and create a controller.
The method will be delete.
Release.
Reaction.
we go?
Let's run a little.
Over here.
So inside the body, we just need to boost the boss ID, right?
Let me get on.
Boss.
Over here.
Say.
Reaction invalid.
Um.
Let's see.
Uh.
Right here.
Let's remove the dailies.
Here we notice that.
We have an error lesson.
Ah, I know the reason.
Because, uh, we boost this thing.
We boost this thing over here.
It will somehow.
Over here!
Ah!
Rahimah!
Rahim.
It not triggers.
The delete is set up it already.
Related words.
Delete.
Over here.
It will pass the ID.
Hmm.
But why?
I already put dust on top of file.
Let me try to boost in the top over here.
Boss reactions.
Let me say it again.
Over here.
It already worked.
Make sure you put it on somehow.
On top.
And let me get it again.
Now we already removed, right?
If we send again and get a boss.
Now you can say it.
Do not somehow negative value.
Okay, let me add a reaction again.
But here we.
Get on.
Movie one and removes.
Again.
One more time.
Okay.
Is already removed.
And for sure we need to check the reaction database or remove okay is already removed.
So that is not about the remove reaction.
I hope you understand this video.
I will see you in the next.