Hi everyone.
Welcome to the new session about the users.
Okay, in this video let's add some additional views into the user schema.
Okay.
Let's add that the following will be biologist, avatar, cover, photo, birthday, and phone numbers.
And all of that can be optional.
Okay.
And we will allow the user to update this information.
Okay.
And uh, it later.
You can add more and more if you want with me.
Uh, just need to build a symbol like that.
And for avatar and cover photo, if you remember, we cannot put directly the string right here from
the Cloudinary.
We cannot do something like that.
Right?
Instead of we will start similar with the bus schema you can say is ah, here we already have something
called many times, right?
So we need to use the media types instead of normal string.
So right here I will cut everything from media tie over here.
And I will put that inside global.
I will put this over here.
Remove the exports and it will fix the issue.
And inside the user schema right here replaced with media file.
Verify.
Uh.
Let me see why.
All ceramic tile.
Okay.
Last time.
Right here.
We got the error.
We got the error from here.
It means we cannot put the glass right here in the global.
Okay, I think I will cut that inside the car.
Inside the global create glass.
Okay.
Put that over here and I will export.
And I will You manually broadcast.
From the wall.
Oh, sorry.
Maxwell, cover up the wall.
Okay.
After last.
Let's continue.
These are the user.
These are the controllers.
We have a method to create user, right?
We don't need that.
Let's remove the create user.
And inside here get current user.
We need to fix that.
Don't worry.
And in this video we will need to do the update for user information.
Let A1 update user DTO.
We will expand from create user DTO.
We will not do that.
Instead we will allow user update the information for the file.
Name and phone number.
Again we will allow the user update That information.
Moved over here.
And maybe if you want to change the name, you can do that also over here.
Then we screen.
Let me remove some film.
Over.
We need to add a little bit right here.
We can check is phone number.
And is.
A nice string.
Over and right here.
A.
We can add an object for here.
Or you can put min min max.
Okay.
Min line.
We can use min decorator.
The name forms.
Uh.
Okay.
Uh.
Move.
The mouse line will be possible right here.
Okay.
And by our, you can add a little bit of Chat Moss Lane maybe.
So you are here.
Let me do it real quick.
Okay.
So that's about the little.
Robot to the users of it.
We need to update the information.
Okay, I will call the users.
Go away please.
DOS user model the file and update.
And good idea over here.
The update.
User is over here.
I will go to the new network.
And check if no user wrote, new note file, etc..
User no file.
And return users.
Let's see you.
Do this.
Let's try to.
Update.
The user.
Let me duplicate.
To match.
And right here, let me, uh, sign.
I will sign in with the account over here.
And, uh.
Um.
I completely forgot about the ID.
Okay, let me say is that I get current users a user pilot intelligent form right here.
Uh, we already put the id.
Of active user, the authentication, uh, controller when we sign in.
Let me close over here.
Users.
This one over here.
The ID most.
First college three.
Okay, that is the respawn authentication video.
Uh, let me, uh, set that.
Over and copy the ID.
Listen here.
Let me call that.
Users.
Who are they?
So I will update that biology.
Poster or something like that.
Let me say.
Yeah.
You can always make sure we put the same.
Let's say now it's I, uh, there must be something on the reason?
Because in this case we should put one more thing.
Is are here we should both the is after now for unfair okay.
What is optional for on field.
Because when we update we will only want to update one or more field okay.
So first of all we put three is optional.
Let me say right here um we already update the bio but it does so right here okay.
The reason because we should update the uh respond user DTO right.
Let me move over here and let me explore.
Fire!
Still over here.
Now, let me send this information again.
Okay.
You can say we already got the buyer and let step by step and add everything.
Biologies and, uh.
Both die and phone number.
He later I will add the avatar.
Don't worry.
Let me say.
Okay, let me show you.
Update the workday.
Year.
Month.
And day.
Okay, first of all, let me say.
So we want to correct for you.
Okay.
The.
Let me change a bit right here.
And insert a schema also.
But that's okay.
My English is not good at all.
I'm sorry for that okay.
So let's go to new okay.
Okay.
Let's say row here okay.
We already update the prototype.
Very attractive.
And if you want we got this both view at the same time right.
Phone number maybe I.
Say for about a month based Okay.
So that's where we would.
Invalid phone number.
Let's say.
Okay I will try to boost some number.
Let's say again it's a phone.
Must be invalid phone number.
I don't know why.
But let me boost the correctly.
Okay.
So make sure you boost the correct number for the bar.
So that is you got the idea right.
And that's for the video.
I will see you in the next one.