How are you everyone?
It is a video like create a comment.
Get right.
Okay, so let's create us.
And if we come on the command service you will say we have a query, right?
We have a query and update okay.
We only need the create update and delete over here right.
Now let me open the command get Y and I will copy some configuration from the message.
To be listed.
Over and after that in the server.
And import.
Server and removes the unused import.
Okay so that's for the command gateway.
And right now we need to add the code for create command okay.
Now let me see how it can be done.
Right here we need to import the event right.
But before that Let me say what is inside the command.
Respondto.
Let me try to copy some idea.
Let me open the database right here.
Insert the commands.
I will copy the boss idea over here.
Right.
With the boss ideas.
And go back to get on command by boss.
And put the idea over here.
And I will say, now you can see we have, uh, some stuff like that, right?
It means right now we need to somehow convert the data from the command over here.
Into this structures in same data structure over here and in the front end.
We need to boost that.
Okay.
Inside the stacks.
Okay.
So right here I will call the save command.
You got a wife after us.
After us.
We need to find.
Right.
We need to find a command.
Let me write the logic over here.
I will change the screen for now.
And I will call command equal.
Why this dot command model.
Right.
Command model dot file by adding an array over here.
And now, if you take a look at the guest comments right here, you say I already popularized the user
command and reply to user for transform video right here.
So for a reason right here we also need to reply also.
Right.
And right here I will just give the command I will throw new log file in session.
And make sure we return the command.
And right here we have some error come from the controller.
And.
Let us remove the get here.
We don't need that.
Okay.
And Inside Korea after we already saved the command with two files.
The command.
Right.
And I will call up right command.
Okay.
And I will call this.
Now by one.
With the save command dot underscore and.
Not over here.
And after that we should in chat there are command gateway.
And right here.
What we need to do, we need to this dot command gateway.
We need to create the headers.
And or command create for us.
And I will come over here.
And I will back the butterflies command over here.
Oh sorry.
After here make sure we convert it into the DTO for same data structure okay.
But right now, every time I think I need to create YouTube methods over here, right?
Let me create a YouTube method.
And right here I will create a jump form.
Into your plus YouTube plus DS.
Now you can say in every detail like uh, no.
For example, I.
Might say, sorry, you can say we always call this thing right?
I want it will separate from me into the YouTube function.
I don't want use this function again and again and again.
So I will vote over here and I will create this box const John Fogg Museum with a function over here,
and I will return the blank to instant, and we need to boost the video.
Play video.
And second one will be is a how you call something like that.
Okay.
And over here and this turn over here.
Right.
Put a little uh, you can say inside the data center, we can say we already put the class constructor.
Right.
So I think I can use class constructor over here and right here let's put say.
No.
Not not not the know how this works.
Let me change back to the normal function.
And so you do some stuff like that.
And we need to go over here.
Okay.
And right here we can put any.
Okay.
We don't care about us.
And right here who you correspond with your equal sign form Ctrl and put a small.
Community of and popularize okay.
Okay.
Like this one.
And put the quantity over here.
Here is written a response commanded your right.
Over the right way.
And move that over here.
And we need to.
Immediately.
By we way.
Command.
Created.
With the very small command detail.
And we need one more base.
Okay.
We cannot only send the command.
Instead of.
We should send.
The.
The boss area.
So.
Right.
We call the commander here belongs to the boss ID.
And actually inside the respawn command, we also have a boss.
And we also have a boss already.
Boss right here will be the ID, okay, but the best way is always send the information for detail.
Okay?
So for that reason, this guy I will go to boss area over here okay.
And right over here boss address screen.
And for that reason in this case I will put boss okay and command we will respawn.
Commander okay I will send back the object for the client.
And right now let's console.log.
Mali and the small community of.
Let's see how it works.
Let me grab this other command.
What is.
Command?
Let us.
Run!
And let me click on save.
And let's check the database.
Sorry.
Let's check the terminal.
Now you will say right here we already got the bus array and respond to manager.
It will have the exact structures, right?
You have exact structure.
You can say put the get command over here.
Let me say with the next command.
Let me copy the and.
Let me say it again.
We'll say right here I will copy.
So this is.
Our copy the ID here with us.
And boost over here.
Okay.
And reply to user ID.
I will reply to Myself.
Over here!
Over here.
Okay, let me say.
And also.
Um.
Right here.
We also got.
And right here we already got the user ID.
User name over here.
Right?
Um.
Okay, so I think it is already work.
Okay.
We already have the data here.
So that's for the video.
And I hope you understand this video.
I will see you in the next one.