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

Path Parameters

Name
Type
Description

Authorization

string

Authentication Token

{
    success: true,
    message: 'Users found',
    data: users (array of users)
}
or 
{
    success: true,
    message: 'no users available',
    data: []
}

Register

GET /api/users/register

Request Body

Name
Type
Description

email

string

email id from fb data

password

string

password (user id) from fb data

fname

string

first name from fb data

lname

string

last name from fb data

profileUrl

string

Profile Url from fb data

deviceId

string

Device Id for later use

{
    success: false,
    message: 'user already exist',
    data: {}
}
or 
{
   success: true
   message: 'user created successfully',
   data: userData
}
or 
{
   success: false
    message: 'error while register'
}

Last updated

Was this helpful?