WEBVTT

00:00.320 --> 00:01.840
Hi everyone!

00:01.840 --> 00:09.200
In this video we will create one more method to get current.

00:11.480 --> 00:20.040
Request by okay, we will build a method for get current request by date of the current user.

00:23.960 --> 00:25.720
We call it later in the front end.

00:25.760 --> 00:35.080
We need to know, um, we have uh, some friend request we already added to handle us on the front end.

00:35.080 --> 00:35.560
Right.

00:35.880 --> 00:38.920
So for that reason, we need to build this thing.

00:42.480 --> 00:46.480
And let me create us.

00:48.680 --> 00:56.560
Right now we need to call this dot request model dot file.

00:57.320 --> 00:57.800
Right.

00:58.840 --> 01:00.320
And we need to put object.

01:02.120 --> 01:04.440
And right here we need to put a sender.

01:04.880 --> 01:06.940
The sender will be the current user.

01:08.980 --> 01:11.180
Dot underscore id right.

01:17.820 --> 01:21.100
And so we will manage.

01:23.180 --> 01:24.780
So I think this will be enough.

01:24.820 --> 01:26.740
Let me return directly over here.

01:28.860 --> 01:30.540
These are the foreign controller.

01:31.340 --> 01:33.740
Let me create the method.

01:34.140 --> 01:36.060
So here.

01:40.540 --> 01:41.460
I will name.

01:44.740 --> 01:45.660
It current.

01:47.100 --> 01:47.740
And here.

02:18.650 --> 02:19.770
Actually right here.

02:19.770 --> 02:21.330
We should put the receiver.

02:21.810 --> 02:22.250
Okay.

02:23.410 --> 02:25.010
Not not the sender.

02:25.050 --> 02:29.690
Because the I send the request to be between right here.

02:29.690 --> 02:31.730
We should log in as the base.

02:31.970 --> 02:32.570
Right.

02:33.010 --> 02:38.010
And the base will know the I already send the request okay.

02:38.810 --> 02:40.370
With the some list over here.

02:40.570 --> 02:43.410
So for that reason we put the receiver okay.

02:43.810 --> 02:45.250
This is my mistake.

02:45.250 --> 02:50.050
And sometime I, I have a little bit of confusion okay?

02:50.890 --> 02:56.090
So don't worry about us when we will progress in later.

02:56.090 --> 02:56.690
Don't worry.

02:59.810 --> 03:00.370
Okay.

03:00.610 --> 03:08.770
So in this case we will use the get method with the.

03:18.750 --> 03:19.350
All right.

03:20.230 --> 03:22.630
Request ready?

03:22.670 --> 03:23.070
Okay.

03:23.110 --> 03:25.350
I think I will call like that.

03:26.710 --> 03:27.550
Give me request.

03:27.590 --> 03:28.190
Ready?

03:38.750 --> 03:39.270
Okay.

03:40.230 --> 03:42.990
Uh, request.

03:43.590 --> 03:44.150
Ready.

03:56.150 --> 03:58.030
And now let me say.

04:00.190 --> 04:00.630
Um.

04:03.510 --> 04:07.550
Raia, I will open up the account.

04:07.630 --> 04:08.150
Right.

04:14.590 --> 04:26.860
And let's say right here, we got an empty array because we don't have a nice ride so far in this sky

04:26.860 --> 04:27.220
review.

04:27.260 --> 04:29.460
Manually remove the.

04:31.580 --> 04:32.100
Remote.

04:45.700 --> 04:47.500
And remove the users.

04:47.540 --> 04:48.500
Ryuzo.

04:56.860 --> 05:07.700
Ogawa here is already empty because in previous video, the friend request will be rejected.

05:07.700 --> 05:08.140
Right?

05:09.220 --> 05:10.220
For now, let me.

05:12.300 --> 05:13.980
Send request.

05:16.500 --> 05:21.420
And I will get rid of my account and said okay, we already got that.

05:21.660 --> 05:24.420
What about if I log in with my account?

05:27.500 --> 05:30.680
Let's So we will gonna empty, right?

05:30.720 --> 05:31.400
First of all.

05:34.960 --> 05:35.480
Okay.

05:35.920 --> 05:36.400
That is.

05:38.120 --> 05:39.240
Let me log in again.

05:49.920 --> 05:51.120
Okay, so.

05:53.600 --> 05:56.040
We need to add a little bit over here.

05:59.040 --> 06:03.200
We need to know the sender's okay.

06:03.240 --> 06:05.920
The sender name or something like that.

06:05.960 --> 06:07.040
Or the receiver.

06:07.080 --> 06:10.840
Also we need to customize a little bit over here.

06:11.320 --> 06:22.960
But before that let me create a module like okay I will populate the sender and populate the receiver

06:23.880 --> 06:24.440
okay.

06:24.880 --> 06:32.960
And actually right now we don't need to populate the receiver because the receiver is the current user.

06:33.000 --> 06:33.480
Right.

06:34.630 --> 06:36.030
Sometimes we don't need that.

06:36.230 --> 06:43.070
But right now, I will also let me say, okay, we already got something like that.

06:43.710 --> 06:50.870
And, uh, let me select only the name and avatar.

06:53.950 --> 06:55.670
And maybe email.

06:57.110 --> 06:57.630
Okay.

06:58.390 --> 06:59.870
And here will be the same.

07:02.270 --> 07:03.710
We only need this few.

07:04.310 --> 07:05.550
We don't need to, uh.

07:06.670 --> 07:07.470
Over here.

07:10.110 --> 07:12.870
Let me say again, okay.

07:12.870 --> 07:15.750
We only have email name avatar.

07:16.430 --> 07:19.550
And here will be the same, right?

07:19.830 --> 07:25.630
And for sure, we need to add a little bit of, uh, join form DTO over here.

07:26.150 --> 07:26.550
Okay.

07:26.550 --> 07:28.390
We don't want the nested object.

07:32.550 --> 07:37.550
And, uh, but not for the job of the next video.

07:37.990 --> 07:39.830
So I will see you in the next one.
