Park.
Everyone in this section, we will do the authentication for the next project.
Okay, so before we do that, let's go to the schema and we have a username name and password.
Right.
I think I will boost one more thing with the.
Email.
To registry.
Okay.
And I think we don't list the username right now.
Let me remove that.
So after we already have a schema we need to create the folder structure for the authentication.
Actually, you can create us directly inside the user service, but I think the best way is separate.
Another thing.
So I will open a new terminal and next generate resource with the authentication.
And Maxwell will use the nodes.
So remove.
The test for the rest API.
Yes.
And we already create us.
Right here.
We don't list the schema or the entity.
Let's remove that because we will reuse the schema from the user.
Okay.
We already have a our module and controller.
What we need to do right now is that the authentication service, we have a little write in, a little
right here.
I will boost the in order to sign up.
Okay.
This is sign up detail.
Right.
I will rename it a little bit sign up detail and I will the name.
Email and password.
Is are here.
Let me import the sign up detail and sign up.
Little.
In size and service right here.
What we need to do.
We need to create a new User, right?
So for a reason, let's color is another way to say how we can create a new data.
If you scroll a bit, you will say in order to create the data we will use this syntax.
Firstly we need to inject the model into the submit okay.
We will inject the repository into the service.
Let me be never in my life.
I remember this line.
Okay.
That's over here.
And we will inject right here.
And let's invoke the user dot name and invoke the model and the model user also.
Okay.
We already have a user model.
Well in order to create that we will be using this way right.
This dot model and both the digital.
Also, we don't have a career.
Okay.
And right here we have the user and we can return the library the user right here.
Okay.
And after that let's go to the controller.
We will remove an inbox sign up DTO and rename it to sign up with zero also.
And let's test that Smart move or not.
All right.
Here we have an error update video right here I will remove the video from update okay.
Remove that.
And inside the controller also we will remove the update over here.
And we got one more error from the Soviet flight over the Soviet last.
Update here we got the error from the net JS.
The reason because right here we already inject the service.
But inside our module we doesn't import the.
Module three the Mongols from here, right.
The first way we can fix that is open the user module and we will copy the import statement over here.
Okay.
We can import us like this.
Here.
And after we invoke the regex application will be successfully started.
Right.
Right here.
Let me create.
The request.
And let's see what is the controller inside the authentication controller.
Inside here.
What I want right now, I want to bust the slide up.
Okay.
I want to would you like us?
To click on drawers to Jason Fuller will be the name.
Email.
And password.
So.
It's written some stuff like last let's say why is.
The reason?
Because I forgot the method.
Let me say okay.
Right here is already create a new data.
Right.
Let me rename the request will be sign up.
So just for the video about how to add the user into the database.
You can say in order to that we just need to call the user model like that okay.
And in the next video we will deep dive into the setup method.
Right now let's understand how we can create the data in the database.
That will be enough right now.
So I will see you in the next one.