Hi everyone.
After we already have a boss schema.
We need to create the bot.
Okay, let's write the boss of it.
But before that, I think I can boost one more property.
Okay, right here we will put groups color.
Okay.
It similar with five books.
Okay.
We can ask the background color of the text.
Right.
So and let me show you.
Right here we need to create a little.
In the background color we can put Some value lies.
Hexadecimal.
Okay, this is why.
Colors and inside the box video.
Let me show you further who we need.
The background color.
Right.
And we need content.
And we also need the privacy.
Okay.
Which is the media URL.
I will show you how we can handle that in later.
Okay.
And we need to add a little bit of validation.
Well in here in the background color it can be optional right.
Because we already added this file okay.
And we need to add one more check for the light is green but a string is not so good in this sky because
the background color only accept the hexadecimal colors.
Right.
Let me, uh, check class validator.
Let's short for class validator.
And if you shop for the color you will see it has one more check for the color.
Right.
We can use that hexadecimal color right here.
And with the content we will use a not empty.
Okay.
This field will be required.
And is.
This spring.
Rye and privacy can be optional.
And.
We can boost a and over here.
Right is a num.
Let me say.
Or actually, we can use the ease in right here and accept node here.
Let me show you this in.
And we need to boost the array with public, private and friends.
So there is only accept this thing and we can use I privacy.
Okay.
That's about the boss little.
And let's continue with that.
Inside the controllers.
We have a create boss.
We don't need to add rows over here because everyone can create boss, right?
Let me go to the boss of it right here.
Okay.
In order to create a boss, we can put the roster like.
This.
And I will return new boss.
Boss.
Save!
Now let's see how it works.
Is there a body?
BlackBerry ten.
And.
Okay, I think we we just missed the content, and we need the authentication.
Let me say.
Muscle we removes the we we need to make sure this is a valid JSON.
Let me say okay we already created the new boss content with privacy and some created art.
Updated art.
Right.
So.
And let me show you.
These are removable.
Okay.
It already creates the news.
But let me just try to drop everything.
Okay.
Right here, let me put one more thing.
Really.
Privacy.
For example, if I boost in release and background color.
Will be invalid.
Also, let me say now it's background color must be a hexadecimal color and privacy must be the value
right here.
Very cool.
Right.
Let me boost the privacy.
And the background color.
Let me say okay.
It's already working as we expected right.
So and we need to create a respondto also.
So I will leave that job for you.
Okay.
In the next video I will do that.