0
I have the following question when creating my user’s Routes and Controller.
I see that when I create the route with Route.Source automatically Adonis creates the CRUD routes and passing the ID in the Update/Show/Delete operations, but I don’t need this ID on the route, once I get the ID by auth.user.id id.
How is my creation of the route:
Route.group(() => {
Route.resource("users", "UserController")
.apiOnly()
.except("store")
.validator(new Map([[["users.update"], ["User/Update"]]]));
}).middleware(["auth"]);
After creating the routes running Adonis route:list it appears that the routes of Show, Update, Destroy need id on the routes.
To what extent is this necessary?
If not, this is how I do not need to pass the ID by parameter on the route?
That’s it at first. I thank you in advance.