Hey, did everybody this year and I know we have spent a ridiculous amount of time in just coding the
sign up route.
The things from now onwards are going to be a little bit faster.
But let me tell you very honestly, I'm not in a mood to give a sprint.
Rather, we are running a marathon here and whenever there is going to be a time where I need to explain
a topic or go in depth or a side route, which where I can explain to you how alternatively things can
be done, I will take my time.
So again, please make sure that you are also ready for that.
So I will walk you through just one last thing here in the sign up and we'll walk you through that.
What else I'm doing, which I'm not recording, but I'll still give you these exercise files.
So first and foremost, if you go up here onto the local host 4000 and you type slash API docs, I am
also side by side writing these docs as well.
I won't be showing them in the video neither.
I'll be recording them in the video because these routes and these documentation take a ridiculous amount
of time.
Yet I will give you the exercise file.
There is no guarantee that I'll be writing every single route, but I'll try my best that whenever I
take time in editing the videos and all of that, I'll take time to edit these documentation.
But again, I'll give you these exercise files as well.
So no worries in case you are looking forward that that I have added the sign up route and all these
tags and how I have written that.
So you can just take a look.
We have already gone through with a dedicated section of writing the docs.
So make sure you are you are completely knowing about that.
Okay.
Moving on inside the user controller, I have made just a few changes here.
Again, not too much.
I'm pretty sure you can actually grab these changes.
So if the files are not there, I'm providing an error message directly.
And once the files are there, I'm actually uploading them.
And in fact, this line of the code that we are trying to extract, all of that, this should even come
above that.
So I'm going to just cut it right now and I'll just say, hey, once this is all done, let's go ahead
and try to extract these things.
So we have now file in all of these things.
So errors go above.
If the file is not there, we receive an error.
If we are not able to see email, password and name, we actually get an error and then we try to upload
and all of that.
So again, just a minor revamping of the code or restructuring of the code, I wouldn't be calling it
as a refactoring because this is just moving the code here and there and trying to access the result.
Rest of the things, I am pretty sure that this ten lines of code is not going to scare you.
Now we are so far in the course.
Okay, what is this?
This is all going good.
But one last thing I would like to mention up here, that since I'm working on these docs, it is actually
totally a kind of a capability that we can try it out and enter name, email, password and photo directly
from here and execute that.
And even we are going to receive the object which is going to look similar to this.
So yes, it took a little bit while up here now addressing all those folks who are pro in the Postman.
Yes.
You might be complaining that, hey, this you told us to do all of these things where EEGs and everything.
We could have done that by swagger 100%.
Agree with you.
Some of you might be saying, hey, we could have done that exactly in the post mine as well.
Yes, I do agree with that.
In fact, I'll show you it here as well.
But my goal behind showing you with the easiest is to show you that not only the postman, they are
always out of the box ways to do the certain things.
So we created the Aegis template to understand that how we can actually simulate name, email, password
and the photo upload.
But we can do the exact thing from here as well.
Let me show you that.
So how it works into the sign of form, just go ahead and just click onto this farm data.
Not the you form data you are encoded, but rather the farm data.
Here, you'll get these three dots you can select on that and yours might be default check unchecked
for the content type.
You can just check mark this and now you'll be allowed to select what kind of file or the text that
you want to send up here.
So in this one, I can go ahead and say that, hey, let's go ahead and register another user.
How many we have registered so far.
Let me just go ahead and work on with that.
So these are the ones up here.
So we got one and the two.
Let's go ahead and move on to the three here from the post itself.
I'm going to go ahead and add the data.
So I'm going to go ahead and say name.
So this one is three and then we got email, which is three at AE, come on ae dot dev and we have pass
word which is also one, two, three, four, five, six and the next one is going to be photo and I
can go ahead and this time choose that, hey, this photo is actually going to be not here.
Come on, this one if it is going to allow me.
There we go.
So this one is going to be file and I can go ahead and select my file.
This time I'll be choosing my CPP dev here and that's it.
That's all I have to do.
And you can select multiple files from here as well.
And if I go ahead and send this to the signup route, it's going to take some time because photo is
getting uploaded.
And now we see that we received the data, which is three and three, and this photo is being uploaded
properly and everything is going on nice.
So yes, I am fully aware of the situation that we can do from data and the simulation, but if I would
have directly taught you that how this can be done and you can just go ahead and get away, let's go
ahead and save and overwrite this one.
If I would have taught you directly up here, we wouldn't have explored the out of the box solutions
of the edges.
Maybe sometimes there is a special situation where you need to do that, or probably you can do and
simulate that via the swagger.
So that's all I wanted to discuss.
Again, all these code files and exercise files will be available with you and there are hundreds of
ways of doing the things.
My best guess is, or my thing is that I want to show you as much as I can in this entire course.
But again, from the next section onwards, we are going to be moving fast, not because we have to,
because it's all repetitive and it's all easy.
Now, let's go ahead and catch up in the next video.