WEBVTT

00:00.480 --> 00:02.120
Hi everyone!

00:04.280 --> 00:12.800
After we already have the ask participants function, we need another method to remove participants

00:13.080 --> 00:17.240
from the group conversation, right?

00:17.880 --> 00:22.000
So that's in the SSI for you.

00:22.680 --> 00:30.160
But please pause the video right here and try to create the another method to remove participants.

00:31.120 --> 00:31.600
Okay.

00:33.960 --> 00:35.920
So how about your solution?

00:36.040 --> 00:37.560
Let me show you how it works.

00:39.520 --> 00:42.920
I will create a method called remove participants over here.

00:44.320 --> 00:48.280
And we need to do exactly the same right here.

00:48.320 --> 00:48.800
Right.

00:49.200 --> 00:56.480
We need participants ID we want to remove and we need to check the conversation.

00:57.400 --> 00:59.520
And we need to check the owner also.

00:59.560 --> 01:00.320
Let me copy.

01:02.940 --> 01:04.380
And Buddhas over here.

01:05.700 --> 01:06.100
Okay.

01:06.140 --> 01:13.860
After that, we need to filter out the conversation based on the idea over here.

01:17.340 --> 01:19.900
Let me try to filter method.

01:21.740 --> 01:24.860
I will jump if it's not inside.

01:27.460 --> 01:28.620
The participants.

01:36.100 --> 01:36.580
Okay.

01:36.580 --> 01:38.020
We will filter out us.

01:42.380 --> 01:43.300
After us.

01:43.340 --> 01:48.860
We need to hold the result because this is the another array.

01:55.540 --> 01:56.780
I will call filter.

01:57.900 --> 01:59.140
Filter participant.

02:03.520 --> 02:04.040
Okay.

02:04.440 --> 02:06.280
And after that make sure we update.

02:14.240 --> 02:19.560
And very important make sure we save it up into the right way.

02:20.080 --> 02:20.600
Okay.

02:21.080 --> 02:22.920
That's for the method.

02:23.160 --> 02:30.560
Let me go to the controllers and I will copy everything here.

02:30.600 --> 02:33.720
And right here you can see this is the application window right.

02:34.560 --> 02:36.720
And actually we can use that.

02:37.000 --> 02:39.800
But I think I will rename a little bit.

02:44.080 --> 02:48.680
And with that all right here we can do that because it's exactly the same.

02:49.240 --> 02:51.800
We don't need to create another video.

02:54.920 --> 03:04.560
So let me copy it over here and remove this one because members right here.

03:06.700 --> 03:09.340
And we can rename the video a bit.

03:11.740 --> 03:13.220
And remove this one.

03:13.900 --> 03:17.900
Okay, so let's open the postman.

03:18.220 --> 03:20.220
And let me open the database.

03:20.260 --> 03:20.620
So.

03:23.460 --> 03:25.900
Firstly I will sign in.

03:32.020 --> 03:33.180
With this account.

03:47.660 --> 03:48.260
Hi.

03:48.780 --> 03:49.260
Okay.

03:49.540 --> 03:55.300
I don't know why I cannot open the postman desktop.

03:55.340 --> 04:01.980
So for that reason, I decided to switch in another tool for testing API.

04:02.540 --> 04:08.880
So I will use this application Insomnia.

04:09.200 --> 04:09.680
Okay.

04:10.160 --> 04:12.920
Let's click on that and download it.

04:13.640 --> 04:18.280
And if you can use the Botman feel free to do that.

04:18.520 --> 04:18.800
Okay.

04:18.840 --> 04:19.760
I don't know why.

04:20.000 --> 04:23.120
In my case it happened to be wrong over here.

04:23.760 --> 04:30.040
So let me show you how we can migrate from the bossman to another API for testing.

04:30.680 --> 04:39.680
Right here you can click on click on more and click on this box and choose the collection and click

04:39.680 --> 04:40.800
on this workstation.

04:41.000 --> 04:41.520
Okay.

04:41.720 --> 04:42.480
After that.

04:42.960 --> 04:45.400
After that you will go back to here.

04:46.520 --> 04:46.880
Okay.

04:46.920 --> 04:48.320
Open the application.

04:48.320 --> 04:55.360
You just download it and right here you can click inside the info section over here.

04:55.400 --> 05:02.080
Click on that and please drag the file you you just over here and click on open.

05:02.360 --> 05:02.840
Okay.

05:03.720 --> 05:06.560
After that you will see the collection over here.

05:07.040 --> 05:09.740
Let me A club, it would ask.

05:12.460 --> 05:15.580
And if you say it exactly the same with the boss man.

05:16.260 --> 05:18.740
Okay, let's try to get that.

05:19.060 --> 05:22.020
Click inside the remote member.

05:22.060 --> 05:22.380
Okay.

05:22.420 --> 05:29.100
You can try to duplicate and create a remote with a remote member.

05:29.140 --> 05:31.460
Also make sure you change the URL.

05:32.500 --> 05:34.500
And right here you should sign in.

05:34.940 --> 05:35.420
Okay.

05:35.660 --> 05:36.900
Copy that token.

05:39.140 --> 05:44.540
And click Insert Remote Members and click on authentication tab right here.

05:44.540 --> 05:46.580
And by this over here.

05:46.620 --> 05:47.060
Okay.

05:48.300 --> 05:56.020
So after that go to the bodies and pass the some participants over here okay.

05:56.060 --> 05:58.020
But flexible over here.

05:58.940 --> 06:06.900
And if I now now you can say I just add a little bit of code right here.

06:07.340 --> 06:10.920
So check for the cannot remove the owner.

06:10.960 --> 06:18.560
Okay, now, if the participant right here is the same with the authentication, we just log in.

06:19.760 --> 06:25.800
Either one remove myself or I don't allow remove the owner.

06:25.840 --> 06:26.400
Right.

06:26.600 --> 06:29.920
So for that reason I will go a little bit over here.

06:30.440 --> 06:36.840
So for event removes the owner's account okay.

06:40.560 --> 06:45.920
So uh that is and if you check the database.

06:53.520 --> 06:57.000
Now if we check inside the conversation.

07:08.040 --> 07:10.800
Let me add members, okay.

07:10.840 --> 07:15.260
To the other member and said, without success.

07:15.500 --> 07:17.780
Okay, let me refresh.

07:38.900 --> 07:39.860
I don't know why.

07:41.100 --> 07:46.860
Let me make up a slip and move over here.

07:47.060 --> 07:47.540
Okay.

07:48.380 --> 07:52.460
And then after that, let me refresh the participants.

07:52.460 --> 07:54.260
Should be three right now.

07:59.420 --> 07:59.940
Okay.

08:00.540 --> 08:08.220
And after that, if I draw the remove member and I got exactly the same with other over here, I said,

08:08.700 --> 08:10.980
well, it's I cannot remove the owner.

08:10.980 --> 08:14.400
So for that reason in this case we should reverse the order.

08:14.680 --> 08:17.120
And over here we will last.

08:17.600 --> 08:21.720
And if I send now, you can say we already got the message.

08:21.720 --> 08:22.720
We made success.

08:23.000 --> 08:27.640
And I expect the participant only have one user.

08:27.680 --> 08:29.000
Let me refresh.

08:38.880 --> 08:45.600
Now you'll see we only have one users, so it means the remote member already work.

08:45.640 --> 08:46.120
Okay.

08:46.480 --> 08:50.520
Let me add it again for the test data.

08:50.560 --> 08:52.520
Bubbles okay.

08:52.560 --> 08:56.520
But right now the remote members already work.

08:57.120 --> 09:01.080
And so thus for the video.

09:03.480 --> 09:09.760
And I hope you understand this course right now.

09:11.040 --> 09:11.560
Okay.

09:12.280 --> 09:15.040
So I will see you in the next one.
