1
00:00:00,330 --> 00:00:05,790
And once we're done setting up our Arth middleware, I also want to mention something where as you're

2
00:00:05,790 --> 00:00:13,680
looking at someone else's code, you might come across of a syntax where instead of creating a object

3
00:00:14,100 --> 00:00:21,680
like we are doing in line twenty, what they do is they look for the user in the database.

4
00:00:21,960 --> 00:00:29,850
So they take the model, the user model, and then either find Bayada or find one that also works.

5
00:00:30,090 --> 00:00:34,230
And then, of course, they just pass in the area that is coming from the token.

6
00:00:34,650 --> 00:00:38,100
And in most cases they'll use the select to remove the password.

7
00:00:38,370 --> 00:00:46,620
There's really no point to parse this password to the upcoming middleware, meaning our requests, and

8
00:00:46,620 --> 00:00:49,250
therefore they just use the select and remove it.

9
00:00:49,590 --> 00:00:57,000
And then when it comes to a drug user, well, they just set it equal to this variable and it's definitely

10
00:00:57,000 --> 00:00:57,570
an option.

11
00:00:57,900 --> 00:01:04,590
But the reason why I'm not doing that in this project is simply because if we just think about it,

12
00:01:04,590 --> 00:01:07,910
we really have no functionality to remove that user anyway.

13
00:01:08,280 --> 00:01:16,750
So if I'm getting my ID from the token, I'm pretty sure that a very is a user on the other side.

14
00:01:17,110 --> 00:01:24,510
Again, you might see this code and yes, we might implement ourselves in the future project, but not

15
00:01:24,510 --> 00:01:25,080
in this case.

16
00:01:25,350 --> 00:01:31,230
I really didn't see the point of looking for the user since we have no functionality to remove it in

17
00:01:31,230 --> 00:01:31,800
the first place.

18
00:01:32,100 --> 00:01:38,460
Now, if you do decide to go with this logic, then of course, just make sure that you remove one 20

19
00:01:38,760 --> 00:01:42,540
because otherwise you're overwriting with our current setup anyway.

