User

File Name : user.js File Path : /server/routes/user.js This route is used to handle end user related queries. For example: fetching single user using id, creating new user, Adding new address to existing end user details, etc.

get
‚Äč

/api/users
Request
Response
Request
Path Parameters
Authorization
required
string
Authentication Token
Response
200: OK
{
success: true,
message: 'Users found',
data: users (array of users)
}
or
{
success: true,
message: 'no users available',
data: []
}

get
Register

/api/users/register
Request
Response
Request
Body Parameters
email
required
string
email id from fb data
password
required
string
password (user id) from fb data
fname
required
string
first name from fb data
lname
required
string
last name from fb data
profileUrl
required
string
Profile Url from fb data
deviceId
required
string
Device Id for later use
Response
200: OK
{
success: false,
message: 'user already exist',
data: {}
}
or
{
success: true
message: 'user created successfully',
data: userData
}
or
{
success: false
message: 'error while register'
}