All right.
And once we have the Morgan package in place now, let's start working on our log-in functionality and
I mean, most of it is going to be exactly the same as the registered one.
How are there going to be some gotchas?
But if you're comfortable with whatever we did with the register, whether that is the back end or the
front end, you'll be in good shape.
And first, I just want to mention that in our in controller, we will use another error, so check
for email and password, both of them are going to be coming from that body.
And if one of them is missing, we'll send back the 401.
The better question, but also we'll check for user using the email.
Um, if the user does not exist or if the password doesn't match to whatever we have in database, then
I want to send back for a one on authenticated error with invalid credentials.
Now the thing is, we haven't created that error.
So what we do or anything, I want to go to errors and then create the on authenticated yes.
And this probably will be another spelling doozy for me.
And then let's set up import and export.
And in the Congress, and I'm talking about in the Congress in the hours and then as far as the cold.
Well, we'll get the status codes, custom API and then the only thing we want to do is just change
the status quo to unauthorized, which is going to be for one.
And then if you want, you're going to right away import an off controller.
But that's not going to be my case.
So I'll just set up the code and import and export in next year.
So let's go here and I'm going to go with on.
Authenticated, yes.
I'm not speeds up, I'll just grab everything from bad request.
Perished and still looking for status codes, still want the custom empire.
Now, the one thing that I want to change here is the name, and again, we're going to go with an authenticated.
Her and like I said, instead of my request, which is 400, let's go with an authorized, which is
401.
Let's save this and let's set a proper imports here as well.
So I'm going to go with my own authenticated error.
I have proper import with jazz and all of that cool stuff.
And now let me move this sucker down.
And now I'm exporting from errors.
One more error.
The unauthenticated one.