#shubhendu Bhakat
Registers a new user by creating a user account with the provided information.
POST
The request body should be in JSON format and include the following fields:
fullname(object):firstname(string, required): User's first name (minimum 3 characters).lastname(string, optional): User's last name (minimum 3 characters).
email(string, required): User's email address (must be a valid email).password(string, required): User's password (minimum 6 characters).
user(object):fullname(object).firstname(string): User's first name (minimum 3 characters).lastname(string): User's last name (minimum 3 characters).
email(string): User's email address (must be a valid email).password(string): User's password (minimum 6 characters).
token(String): JWT Token
Authenticates a user using their email and password, returning a JWT token upon successful login.
POST
/users/login
The request body should be in JSON format and include the following fields:
email(string, required): User's email address (must be a valid email).password(string, required): User's password (minimum 6 characters).
user(object):fullname(object).firstname(string): User's first name (minimum 3 characters).lastname(string): User's last name (minimum 3 characters).
email(string): User's email address (must be a valid email).password(string): User's password (minimum 6 characters).
token(String): JWT Token
Retrieves the profile information of the currently authenticated user.
GET
Requires a valid JWT token in the Authorization header:
Authorization: Bearer <token>
user(object):fullname(object).firstname(string): User's first name (minimum 3 characters).lastname(string): User's last name (minimum 3 characters).
email(string): User's email address (must be a valid email).
Logout the current user and blacklist the token provided in cookie or headers
GET
Requires a valid JWT token in the Authorization header or cookie:
user(object):fullname(object).firstname(string): User's first name (minimum 3 characters).lastname(string): User's last name (minimum 3 characters).
email(string): User's email address (must be a valid email).password(string): User's password (minimum 6 characters).
token(String): JWT Token##/captains/registerEndpoint
Registers a new captain by creating a captain account with the provided information.
POST
The request body should be in JSON format and include the following fields:
fullname(object):firstname(string, required): Captain's first name (minimum 3 characters)lastname(string, optional): Captain's last name
email(string, required): Captain's email address (must be a valid email)password(string, required): Captain's password (minimum 6 characters)vehicle(object):color(string, required): Vehicle color (minimum 3 characters)plate(string, required): Vehicle plate number (minimum 3 characters)capacity(number, required): Vehicle passenger capacity (minimum 1)vehicleType(string, required): Type of vehicle (must be 'car', 'motorcycle', or 'auto')