Hi!
As you can see, I used the auth function almost on all of the routes instead of the create user, and login routes.
That means that after creating your user, first, you need to login to get a token.
Then put it in the Authorization in the headers with 'Bearer' before.
And then you'll have access to the rest of the routes (according to your user role).
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi!
As you can see, I used the auth function almost on all of the routes instead of the create user, and login routes.
That means that after creating your user, first, you need to login to get a token.
Then put it in the Authorization in the headers with 'Bearer' before.
And then you'll have access to the rest of the routes (according to your user role).