Hi everyone!
After we already have a method to send friend requests, we will allow the user can cancel this send
request, right?
For example, I mark send request to be okay, but.
After some time the eyes realize we already made a mistake.
Okay, I don't want send a request to the base.
Okay.
In this case, we haven't communist the state that we will accept or okay, it's still the pending right
now.
So we will allow the.
I can cancel the send request.
Right.
So let me show you.
Um.
We need to create controllers.
Let me go back over here.
Uh, I will call the cancel request with a receiver ID also.
And cancel friend request.
And we need to create, uh.
The method.
Right.
I think this guy, we can use the remove over here.
Let me.
Let me change to remove.
And go here.
Shadow call user.
Okay.
Right here.
After here.
We need to find love for Ray.
Request over here with the title will be pending.
Right.
We need to find like that.
And we need to find receivers right here.
So let me copy.
Mood over here.
Okay.
After we got a friend.
Request we can remove that.
Okay.
If the friend request do not exit, we will follow.
All new log file.
Reception.
Friend request.
No, not as is.
And if it has it, we can remove that.
We can use this one over here.
Something like that.
Let me see it work or not.
Okay.
Go here, I will.
I will go, I will duplicate.
The methods right here.
I think the method is still the post.
Okay.
Plus one here.
And here.
So request.
Let me set.
The friend request already set.
What about.
Asking.
The result maker Studios in this case.
And so request.
Let me try to console.log over here.
Let me fix the some Stuff.
Right here.
Let's remove the daily.
Let me say it again.
Okay.
Right now it's already work.
Okay.
It's already go to this controller.
Let me remove and, uh, let me check my.
Okay.
It's only removes the friend request.
Okay.
And right here you can say we already returned some status.
With the query editor, but not what we want.
I only want it will be so for the rest with the okay status.
Right?
We can just omit us over here.
Status.
Okay.
And you can put.
Uh.
We not at the status.
We are at the.
We.
Got okay.
And over here also.
Okay.
This will work for now.
Let me remove some use method over here.
And so that will be enough for the cancel request.
And I will see you in the next one.