1
00:00:00,720 --> 00:00:03,460
In this part, we are going to save the user.

2
00:00:03,810 --> 00:00:08,520
So first we have to create a model and we can just.

3
00:00:10,170 --> 00:00:10,830
Copley's.

4
00:00:13,210 --> 00:00:18,100
And pace here and we changed the name to use user.

5
00:00:21,100 --> 00:00:24,490
And we named these as users skimmer.

6
00:00:29,810 --> 00:00:32,120
And then we change this to email.

7
00:00:33,720 --> 00:00:39,210
Type string required is true and unique is true.

8
00:00:42,570 --> 00:00:51,750
And our case is truth, so we have to set out email to be the lower case and we do not want to have

9
00:00:51,750 --> 00:00:55,230
to send email to just her to use her.

10
00:00:55,890 --> 00:00:57,510
So at last is the password.

11
00:01:00,850 --> 00:01:04,750
And in the night is six.

12
00:01:13,980 --> 00:01:19,380
And we change theirs to user and we named this should be a lowercase user.

13
00:01:21,550 --> 00:01:24,880
So after we divide the structure of the user document.

14
00:01:26,750 --> 00:01:33,860
We are going to get off Congress and we are going to save the USA and sign up process.

15
00:01:35,180 --> 00:01:43,580
So we already got the name, email and password from the request body, so we the structure.

16
00:01:59,910 --> 00:02:03,180
And then we are going to import a model on the top.

17
00:02:04,600 --> 00:02:10,810
So we are going to add a constant user is equal to.

18
00:02:13,140 --> 00:02:13,950
We acquire.

19
00:02:20,970 --> 00:02:22,530
Modules and user.

20
00:02:25,150 --> 00:02:28,450
And now we are going to create the user.

21
00:02:30,080 --> 00:02:33,050
By using the user to create.

22
00:02:35,180 --> 00:02:46,010
And we created with the name email and password, and since we want to return a user instance, so we

23
00:02:46,010 --> 00:02:47,000
create a user.

24
00:02:48,060 --> 00:02:53,130
Cornerstone is eco to use a doctorate, and since this is a.

25
00:02:54,470 --> 00:02:59,660
Pomers, so we have to use the athing, our weight.

26
00:03:04,530 --> 00:03:09,060
And I we her on the surface statement to a one.

27
00:03:10,850 --> 00:03:20,240
With that, Jason, is there the two one means created, otherwise we are going to return to a tad.

28
00:03:24,610 --> 00:03:33,130
If the status is and then understand it has sent a strong ego to fail to create user.

29
00:03:34,840 --> 00:03:43,480
And then here we are going to consult Lord area, and since we already returned something before, also

30
00:03:43,510 --> 00:03:48,220
we do not need this so we can go to the postman again.

31
00:03:48,670 --> 00:03:57,220
And if we have the name email and password and then send to the site request every time turned a user,

32
00:03:57,230 --> 00:04:00,810
we have no idea where she is coming from, the Mongul DB.

33
00:04:01,660 --> 00:04:05,200
And if we go to the Mongo DB and refresh.

34
00:04:07,700 --> 00:04:12,410
And now you can see the user, Peter, already stored inside the Mongo DB.
