WEBVTT

00:03.760 --> 00:09.010
Hey, did everybody this year and I know we have spent a ridiculous amount of time in just coding the

00:09.010 --> 00:09.970
sign up route.

00:10.000 --> 00:12.850
The things from now onwards are going to be a little bit faster.

00:12.850 --> 00:16.650
But let me tell you very honestly, I'm not in a mood to give a sprint.

00:16.660 --> 00:21.460
Rather, we are running a marathon here and whenever there is going to be a time where I need to explain

00:21.460 --> 00:26.620
a topic or go in depth or a side route, which where I can explain to you how alternatively things can

00:26.620 --> 00:28.360
be done, I will take my time.

00:28.360 --> 00:31.660
So again, please make sure that you are also ready for that.

00:31.840 --> 00:35.890
So I will walk you through just one last thing here in the sign up and we'll walk you through that.

00:35.890 --> 00:40.330
What else I'm doing, which I'm not recording, but I'll still give you these exercise files.

00:40.330 --> 00:48.340
So first and foremost, if you go up here onto the local host 4000 and you type slash API docs, I am

00:48.340 --> 00:51.130
also side by side writing these docs as well.

00:51.160 --> 00:53.230
I won't be showing them in the video neither.

00:53.230 --> 00:58.420
I'll be recording them in the video because these routes and these documentation take a ridiculous amount

00:58.420 --> 00:59.020
of time.

00:59.020 --> 01:01.150
Yet I will give you the exercise file.

01:01.180 --> 01:05.530
There is no guarantee that I'll be writing every single route, but I'll try my best that whenever I

01:05.530 --> 01:10.810
take time in editing the videos and all of that, I'll take time to edit these documentation.

01:11.080 --> 01:13.450
But again, I'll give you these exercise files as well.

01:13.450 --> 01:18.040
So no worries in case you are looking forward that that I have added the sign up route and all these

01:18.040 --> 01:19.390
tags and how I have written that.

01:19.390 --> 01:20.620
So you can just take a look.

01:20.620 --> 01:23.710
We have already gone through with a dedicated section of writing the docs.

01:23.710 --> 01:29.020
So make sure you are you are completely knowing about that.

01:29.050 --> 01:29.550
Okay.

01:29.770 --> 01:35.380
Moving on inside the user controller, I have made just a few changes here.

01:35.380 --> 01:36.970
Again, not too much.

01:36.970 --> 01:39.160
I'm pretty sure you can actually grab these changes.

01:39.160 --> 01:43.420
So if the files are not there, I'm providing an error message directly.

01:43.420 --> 01:46.510
And once the files are there, I'm actually uploading them.

01:46.510 --> 01:51.310
And in fact, this line of the code that we are trying to extract, all of that, this should even come

01:51.310 --> 01:51.880
above that.

01:51.880 --> 01:57.400
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

01:57.400 --> 01:59.770
and try to extract these things.

01:59.770 --> 02:01.930
So we have now file in all of these things.

02:01.930 --> 02:03.370
So errors go above.

02:03.370 --> 02:05.470
If the file is not there, we receive an error.

02:05.470 --> 02:10.300
If we are not able to see email, password and name, we actually get an error and then we try to upload

02:10.300 --> 02:11.020
and all of that.

02:11.020 --> 02:16.990
So again, just a minor revamping of the code or restructuring of the code, I wouldn't be calling it

02:16.990 --> 02:21.430
as a refactoring because this is just moving the code here and there and trying to access the result.

02:21.460 --> 02:26.830
Rest of the things, I am pretty sure that this ten lines of code is not going to scare you.

02:26.830 --> 02:28.930
Now we are so far in the course.

02:29.230 --> 02:30.790
Okay, what is this?

02:30.790 --> 02:31.870
This is all going good.

02:31.870 --> 02:37.450
But one last thing I would like to mention up here, that since I'm working on these docs, it is actually

02:37.450 --> 02:43.510
totally a kind of a capability that we can try it out and enter name, email, password and photo directly

02:43.510 --> 02:44.920
from here and execute that.

02:44.920 --> 02:48.280
And even we are going to receive the object which is going to look similar to this.

02:48.280 --> 02:55.930
So yes, it took a little bit while up here now addressing all those folks who are pro in the Postman.

02:55.930 --> 02:56.380
Yes.

02:56.380 --> 03:01.060
You might be complaining that, hey, this you told us to do all of these things where EEGs and everything.

03:01.060 --> 03:03.430
We could have done that by swagger 100%.

03:03.430 --> 03:04.180
Agree with you.

03:04.210 --> 03:07.600
Some of you might be saying, hey, we could have done that exactly in the post mine as well.

03:07.630 --> 03:08.890
Yes, I do agree with that.

03:08.890 --> 03:10.720
In fact, I'll show you it here as well.

03:10.720 --> 03:15.760
But my goal behind showing you with the easiest is to show you that not only the postman, they are

03:15.760 --> 03:19.030
always out of the box ways to do the certain things.

03:19.030 --> 03:25.330
So we created the Aegis template to understand that how we can actually simulate name, email, password

03:25.330 --> 03:26.170
and the photo upload.

03:26.170 --> 03:28.210
But we can do the exact thing from here as well.

03:28.210 --> 03:29.230
Let me show you that.

03:29.230 --> 03:34.810
So how it works into the sign of form, just go ahead and just click onto this farm data.

03:34.810 --> 03:38.770
Not the you form data you are encoded, but rather the farm data.

03:38.860 --> 03:43.900
Here, you'll get these three dots you can select on that and yours might be default check unchecked

03:43.900 --> 03:44.890
for the content type.

03:44.890 --> 03:49.750
You can just check mark this and now you'll be allowed to select what kind of file or the text that

03:49.750 --> 03:51.100
you want to send up here.

03:51.100 --> 03:55.720
So in this one, I can go ahead and say that, hey, let's go ahead and register another user.

03:55.720 --> 03:57.940
How many we have registered so far.

03:57.940 --> 04:00.010
Let me just go ahead and work on with that.

04:00.010 --> 04:01.870
So these are the ones up here.

04:01.870 --> 04:03.520
So we got one and the two.

04:03.520 --> 04:07.000
Let's go ahead and move on to the three here from the post itself.

04:07.000 --> 04:08.710
I'm going to go ahead and add the data.

04:08.710 --> 04:10.420
So I'm going to go ahead and say name.

04:10.420 --> 04:23.410
So this one is three and then we got email, which is three at AE, come on ae dot dev and we have pass

04:23.650 --> 04:31.150
word which is also one, two, three, four, five, six and the next one is going to be photo and I

04:31.150 --> 04:36.370
can go ahead and this time choose that, hey, this photo is actually going to be not here.

04:36.730 --> 04:40.210
Come on, this one if it is going to allow me.

04:41.570 --> 04:42.300
There we go.

04:42.320 --> 04:45.860
So this one is going to be file and I can go ahead and select my file.

04:45.860 --> 04:50.150
This time I'll be choosing my CPP dev here and that's it.

04:50.150 --> 04:51.080
That's all I have to do.

04:51.080 --> 04:53.570
And you can select multiple files from here as well.

04:53.570 --> 04:58.490
And if I go ahead and send this to the signup route, it's going to take some time because photo is

04:58.490 --> 04:59.480
getting uploaded.

04:59.480 --> 05:05.360
And now we see that we received the data, which is three and three, and this photo is being uploaded

05:05.360 --> 05:07.190
properly and everything is going on nice.

05:07.190 --> 05:12.170
So yes, I am fully aware of the situation that we can do from data and the simulation, but if I would

05:12.170 --> 05:17.480
have directly taught you that how this can be done and you can just go ahead and get away, let's go

05:17.480 --> 05:19.160
ahead and save and overwrite this one.

05:19.910 --> 05:24.350
If I would have taught you directly up here, we wouldn't have explored the out of the box solutions

05:24.350 --> 05:25.370
of the edges.

05:25.370 --> 05:30.020
Maybe sometimes there is a special situation where you need to do that, or probably you can do and

05:30.020 --> 05:31.280
simulate that via the swagger.

05:31.280 --> 05:33.170
So that's all I wanted to discuss.

05:33.170 --> 05:37.730
Again, all these code files and exercise files will be available with you and there are hundreds of

05:37.730 --> 05:38.750
ways of doing the things.

05:38.750 --> 05:44.720
My best guess is, or my thing is that I want to show you as much as I can in this entire course.

05:44.720 --> 05:49.100
But again, from the next section onwards, we are going to be moving fast, not because we have to,

05:49.100 --> 05:51.500
because it's all repetitive and it's all easy.

05:51.500 --> 05:53.810
Now, let's go ahead and catch up in the next video.
