Hi everyone.
We haven't accomplished the raw.
Raw yet.
The reason?
Because if you see this code right here, it's only work.
If the result.
Right here will be the user ID, right.
You can say about us because this is the user controller.
So for that reason the ID right here will be the user ID right.
But what happens if uh.
Later we have uh, another resource like boss.
Okay.
Like boss or command or something like that.
So how we can perform the action.
It mean in later if we move the result Here.
It means right here in the mosque.
And clearly the user ID and the ID will be very different, right?
We cannot compare us in this way.
So is that all we need to somehow.
Look up no result ID.
So let me show you what I mean right now.
Let me create another resource to demonstrate for you.
Okay.
You can go with my resource.
I will create a new resource with mosque.
And now let me clear master with disable testing.
The rest we are.
After us.
Let me check those remarks again.
And it says here, let me.
We have a boss and a day.
Right.
Let me open this game right here I will be.
At night I will be right here.
I will boost the prop.
For the title screen.
Okay.
Right now, um, we will only put the title in later.
I will refactor the entity.
Okay.
Right now, let's only focus into the authorization and we will have one more block.
We will the user.
Okay.
Because the boss right here who created the boss okay.
We want that.
So for that reason we will boost Those users came over here.
And right now we need to make a referral.
Let me, uh, load up the.
The example.
Right here.
It will load the the ties and the reference.
Okay.
Let me copy everything.
Okay.
We will import the mongoose, uh, right here and reference remain users.
Okay.
And it already imported both Mojo.
Navigator an already successfully started.
Right.
And let me create the boss in a very widely.
Elizabeth Norris is our boss and we would like to recast.
Okay.
Don't focus into the detail first.
Right.
Here we go.
Boss one.
Uh, we need to inject.
Um, I completely forgot.
To put on a model injection.
Um.
Let's see.
Um, make sure we involve the team.
Boss module.
Best over here.
Must we embark directly from the schema?
Okay.
Here we are.
The last thing we need to create is the number one.
Schema.
Okay.
Insert a module.
After that, let's say we need to inject us.
Into moral moss.
Uh, from the entity.
Okay.
Don't.
Don't import us from Next.js.
What about the user?
Okay.
Right here I will find user.
Uh.
Right now.
Right now, we will invoke involve the user over here.
Okay.
We just demonstrate it later.
In order to inject the analytics, we should inject the service.
Okay.
It much more better than invoke directly.
But right now we only focus.
Like, only only focus in the authorization.
Okay.
Let me say.
Let me copy this one over here.
Okay.
After we already got a user, we would use the one over here.
Use okay.
And new bot.
So.
To use our tool.
And we need to apply.
New boss one last time.
And why boss.
So that's why.
And we got the error.
Because inside the boss module we should invoke the user.
Okay.
Now, let me, uh, duplicate entire folder.
And insert a controller.
We need to rename that boss.
With the Boston Marathon.
And right here.
Let's remove everything and say, okay, after that, let's check the database.
Uh, right here we only.
Uh, we don't have users.
Let me say why.
Or the reason?
Because I forgot to put the schema decorator.
Okay, let's remove that.
And I also forgot.
Relentless.
Okay, let's pretend to be masked.
First.
I'm not.
Okay.
So let's.
Let me drop.
And refresh.
Okay.
For now, we already have the title.
And let me show you possible in order to get your own boss, if we use the following, we will drop.
Furthermore around at mid and final or actually the get go here okay.
Furthermore like this or the bus over here also the same at the bus or here it much more better.
I want the admin can perform the action okay.
And I want the user can update its boss.
Okay.
So let's say how to do Told us.
Let's open the logo right here.
Did you say this is the idea?
Right?
This is clearly the boss ID.
This is not a real ID or the user.
It will not be user ID, right?
For that reason.
It's clearly not work in this sky.
And it always throws error.
Let me show you.
Okay, boss.
Change the path.
Right.
And, uh.
For example, I will buy this thing.
And I also sign in with this account.
Okay.
This is clearly the account.
Let's see what is on the right road.
Arrow.
Okay.
So I hope you understand.
Why is the road arrow?
Because this is clearly different, right?
So that is in the next video we will step by step and fixing that issue.
So I will see you in the next one.