-
POST /v1/auth/signup
- Takes in
name
,email
,password
. - Creates the User in MongoDB
- Returns a JWT for future authorization
- Takes in
-
POST /v1/auth/login
- Takes in
email
,password
- Checks if the email id is in the database.
- If email id is found, compares the password.
- Also, returns the JWT for future authorization
- Takes in
-
GET /v1/users/profile
- Returns user profile (
name
,email
,hashedpassword
) - Protected Route
- Returns user profile (
-
PATCH /v1/users/profile
- Changes the user profile
- Takes in
name
- Updates user name in database
- Protected Route
Ninjavin/NodeJS-Application
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|