WEBVTT

00:01.360 --> 00:02.720
Hi everyone.

00:02.720 --> 00:06.080
In this video let's continue with the users.

00:06.800 --> 00:07.320
Okay?

00:07.880 --> 00:12.800
In this video we will do for my own method over here.

00:17.440 --> 00:21.680
Right here we just need to return this dot.

00:23.720 --> 00:25.880
User model dot file.

00:28.480 --> 00:29.000
Okay.

00:30.640 --> 00:32.600
And let's start.

00:33.160 --> 00:36.480
Let me up the row over here.

00:36.720 --> 00:37.520
So that is.

00:44.480 --> 00:49.920
Right here you can see we already got user with some stuff like that.

00:50.800 --> 00:51.720
And uh.

00:54.240 --> 00:58.880
Let's go to the file one method.

01:03.710 --> 01:04.150
With.

01:04.150 --> 01:05.630
Here we define one method.

01:06.150 --> 01:12.910
We don't list any authorization because everyone can see the profile.

01:13.470 --> 01:14.070
Okay.

01:14.110 --> 01:15.470
So let me do that.

01:32.670 --> 01:33.190
Okay.

01:33.230 --> 01:33.830
Let.

01:36.190 --> 01:36.630
Me.

01:38.870 --> 01:40.110
Get a users.

01:43.230 --> 01:45.150
Say okay.

01:45.150 --> 01:46.270
We already got.

01:49.710 --> 01:52.270
And now one more thing we will delete.

01:52.630 --> 01:53.190
Okay.

01:53.710 --> 02:01.180
Well in order to do the list we should we showed you the technique.

02:01.380 --> 02:02.500
Soft release.

02:02.500 --> 02:02.980
Right?

02:03.980 --> 02:04.340
Okay.

02:04.340 --> 02:08.420
Inside the database schema, we need to provide one more block.

02:10.100 --> 02:10.540
Okay.

02:10.580 --> 02:12.540
I will call it ASAP.

02:12.860 --> 02:13.980
Will be the folder.

02:15.420 --> 02:18.060
And the file will be true.

02:18.260 --> 02:18.740
Okay.

02:18.980 --> 02:24.260
When we create a new user file we will go.

02:24.700 --> 02:27.500
And when we release.

02:28.900 --> 02:30.820
When we release, we just need to.

02:34.180 --> 02:35.220
Turn off that.

02:35.740 --> 02:36.700
Let me show you.

02:57.660 --> 03:02.060
The file and An update here would add.

03:20.780 --> 03:22.060
And we need to update.

03:22.460 --> 03:25.820
That is if we make false.

03:26.020 --> 03:26.500
Okay.

03:27.060 --> 03:32.580
That's how we can remove the user and let return the user also.

03:33.620 --> 03:42.580
Oh actually I think we don't need to return anything because this is just the how we can remove.

03:42.780 --> 03:43.300
Okay.

03:47.420 --> 03:55.300
Actually we need to check if user new session.

03:57.500 --> 03:59.530
And we don't need to return anything.

03:59.970 --> 04:02.450
Okay, this will be good, right?

04:05.290 --> 04:09.570
And not so good of you to drop.

04:13.930 --> 04:15.170
Let me show you.

04:32.890 --> 04:38.450
Now, if I refresh the database with the users.

04:52.330 --> 04:54.570
Now, you can see we don't have any.

04:54.570 --> 04:59.640
Is active right here because we only created this data before, right?

05:01.960 --> 05:15.240
Let me say right here I will duplicate a gentle release delete user soft release okay.

05:20.160 --> 05:21.280
And I will.

05:25.440 --> 05:29.400
Say we have an internal server error.

05:29.440 --> 05:30.560
Let me double check.

05:39.400 --> 05:43.200
We have error from here.

05:52.560 --> 05:52.880
Uh.

05:59.990 --> 06:00.710
Let me say.

06:07.750 --> 06:12.750
Right now, the reason we need to check.

06:15.230 --> 06:18.350
Let me say, uh.

06:28.230 --> 06:32.510
Right now, if we return a user, it should work, right?

06:32.710 --> 06:33.510
Let me say.

06:42.910 --> 06:46.350
If I return a user, it worked.

06:47.630 --> 06:59.470
But if I don't return, it means this guy artillery away and will not return anything over here.

07:08.950 --> 07:10.590
Well, we still got the.

07:13.430 --> 07:15.870
So I think we need to.

07:17.070 --> 07:19.910
I will go to the.

07:22.150 --> 07:24.030
Channel for a little bit.

07:24.070 --> 07:25.310
I need to fix that.

07:29.110 --> 07:29.550
Right here.

07:29.550 --> 07:31.270
We need to check if we have a data.

07:32.230 --> 07:32.750
Right.

07:33.350 --> 07:38.150
The reason we we call right here, if we console.log the data, let's say.

07:50.310 --> 07:52.750
Now data will be undefined, right?

07:52.790 --> 07:57.740
And we we are not calling here into the undefined method.

07:58.660 --> 08:00.780
For that reason, it will throw an error.

08:01.700 --> 08:02.820
Okay, let me check.

08:04.540 --> 08:06.180
And this should work.

08:11.940 --> 08:15.580
Let me say right here we already got method success.

08:16.180 --> 08:17.540
And let me refresh.

08:25.140 --> 08:28.660
Now you will see this here will be adaptive will be false right.

08:29.820 --> 08:35.780
And I think we we should put over here with this user.

08:38.260 --> 08:41.980
And I will refresh and I will update manually.

08:42.340 --> 08:45.180
It's back to the draw method.

08:47.460 --> 08:47.900
Okay.

08:47.900 --> 08:49.780
Furthermore here I will want to show.

08:58.330 --> 08:58.650
Okay.

08:58.650 --> 09:01.370
I think we already have enough tape.

09:01.570 --> 09:04.410
We need to fix a little bit over here.

09:05.730 --> 09:07.130
Is that a user service?

09:07.130 --> 09:10.490
You can see right here if I get on users.

09:15.930 --> 09:19.450
Let me, uh, turn off the sun.

09:28.450 --> 09:31.050
Now, you can say, uh, right here.

09:31.050 --> 09:33.850
We still got this thing.

09:33.890 --> 09:34.330
Okay.

09:34.570 --> 09:40.890
This thing is already disabled account or is active phone.

09:41.210 --> 09:41.530
Okay.

09:41.570 --> 09:43.570
I don't want to show that in here.

09:43.570 --> 09:49.010
So for some reason, we need to add a little bit of check condition over here.

09:49.890 --> 09:50.410
Okay.

09:50.570 --> 09:52.850
We already filter this to be true.

09:53.570 --> 09:57.080
If it will be formed we will filter out that.

09:57.480 --> 10:02.720
And this will be for the file one.

10:04.800 --> 10:05.480
Over here.

10:13.360 --> 10:19.080
Uh, with this guy, we don't need any projection.

10:19.400 --> 10:21.000
We can put on the file.

10:21.000 --> 10:24.000
And right here we can boost the is update.

10:24.680 --> 10:27.520
Um, no, let me say.

10:29.560 --> 10:30.000
Okay.

10:30.040 --> 10:32.640
We can move it over here.

10:32.680 --> 10:33.120
Right?

10:34.080 --> 10:34.480
Hmm.

10:35.840 --> 10:37.440
We will drop also.

10:38.280 --> 10:42.240
And let's get current user right here will be also.

10:46.640 --> 10:47.440
Is update.

10:47.440 --> 10:49.680
We will go okay.

10:50.600 --> 10:53.640
We need to a little bit of checking over here.

10:54.200 --> 11:00.480
Remove the method over here and remove unused import.

11:09.400 --> 11:10.440
This side again.

11:10.880 --> 11:16.280
Okay, we already got and we need to fix the return.

11:17.360 --> 11:17.840
Okay.

11:17.880 --> 11:18.520
Right here.

11:18.880 --> 11:26.040
Maybe inside the DTO over here, we need to export one more thing, which is update.

11:30.240 --> 11:30.760
Rate.

11:38.040 --> 11:39.400
And we need to say that.

11:42.000 --> 11:42.520
Okay.

11:42.520 --> 11:44.640
We already got is active.

11:45.240 --> 11:49.960
And, uh, we need to fix the authentication also.

11:50.880 --> 11:51.360
Okay.

11:51.960 --> 11:57.350
Because when we logged in right here.

11:58.670 --> 12:02.070
We need to check if the user are visible.

12:02.110 --> 12:03.910
We need to throw the error.

12:03.950 --> 12:15.990
Okay, let me show you after we already have a use here, we need to check inside this method if user

12:16.310 --> 12:29.750
A will be false result, but request exception that the cloud account.

12:31.870 --> 12:34.430
Has low bit.

12:34.710 --> 12:36.030
Okay something like that.

12:41.270 --> 12:47.310
And we need to fix the by lot also okay.

12:47.350 --> 12:54.820
Because the is active field can be for authentication Asian information.

12:54.820 --> 12:55.260
Right?

12:55.300 --> 12:55.660
So what?

12:56.100 --> 12:57.220
We need to put that inside.

13:06.220 --> 13:06.740
Okay.

13:07.940 --> 13:09.980
And that is a design method also.

13:14.020 --> 13:15.740
User active.

13:16.700 --> 13:17.180
Okay.

13:17.220 --> 13:29.140
And we need to put that inside the authentication right here which is opaque because the user just a

13:29.780 --> 13:36.260
bit we need to fit in user by a little bit.

13:37.860 --> 13:38.900
Here we pull it up.

13:40.100 --> 13:40.620
Okay.

13:40.940 --> 13:42.660
Now let's test again.

13:45.860 --> 13:52.300
How we side by side with account is no longer a person.

13:52.340 --> 13:52.660
Okay.

13:52.700 --> 13:56.730
Your account has no longer active as well.

13:57.250 --> 13:58.210
Log in right here.

13:58.650 --> 14:01.650
Okay, we already got this information.

14:04.570 --> 14:11.690
But we need to customize the response a little after authentication a little bit.

14:12.810 --> 14:17.290
This box is actually really cool.

14:17.610 --> 14:18.010
So.

14:28.010 --> 14:28.410
Okay.

14:28.410 --> 14:29.730
We already got the active.

14:30.290 --> 14:38.330
And let me copy this thing and go to the guest current user or get profile.

14:39.290 --> 14:43.610
Move over here and say um.

14:45.930 --> 14:47.490
For some reason.

14:50.210 --> 14:55.250
Is active which you are I know because.

14:56.130 --> 15:01.330
Because the reason up in here.

15:01.650 --> 15:03.130
This is the projection.

15:03.490 --> 15:05.170
Okay, if you say.

15:09.770 --> 15:10.250
It's high.

15:10.250 --> 15:12.770
This is projection and projection.

15:12.770 --> 15:16.490
It will somehow select some data okay.

15:16.530 --> 15:20.570
So actually that's not what we want right.

15:22.930 --> 15:27.410
We can boost the right here.

15:27.450 --> 15:29.850
I think we should refactor a little bit.

15:30.490 --> 15:36.210
Instead of using the file by ID we will unify one.

15:36.810 --> 15:39.370
And with the file one we can put it over here.

15:40.690 --> 15:41.770
Underscore ID.

15:44.090 --> 15:47.410
And it will be true.

15:48.570 --> 15:49.010
Okay.

15:49.050 --> 15:49.530
That is.

15:50.090 --> 15:56.280
And this here also let me replenish this thing.

15:58.800 --> 16:02.160
And replace it with current user ID.

16:03.760 --> 16:07.520
And this here will be workload.

16:09.720 --> 16:10.680
Yeah, yeah.

16:13.480 --> 16:16.920
Okay so let me send again.

16:17.760 --> 16:18.200
Okay.

16:18.240 --> 16:21.920
Right now we already got the new information the data over here.

16:22.200 --> 16:26.800
And let's test again with again on user okay.

16:27.840 --> 16:30.640
So, um.

16:34.480 --> 16:36.040
I think this should work.

16:36.840 --> 16:39.800
Let me copy editing and test one more time.

16:39.800 --> 16:40.520
Is that okay?

16:40.880 --> 16:45.640
A user said okay.

16:46.240 --> 16:52.000
So that is that's for the video and I hope you understand this video.

16:52.040 --> 16:52.920
I will see you in the.
