Skip to content

Bhargavjd/Customer-Details-API

Repository files navigation

Customer Details APIs Using Node.js, MySQL and JWT

HTML form:

image

image

On Submit -> Redirected to /users/all

image image

• /details

Structure: BASE_URL/details/${user_id}

Returns: object:{...user_details}

image

• /update

Structure: BASE_URL/update

Request Body: object:{...new_details_of_user}

Returns: Some kind of a success or failure message for acknowledgement

  1. Update without login: Fails with error message “No token provided!” image

  2. Update with Login: Using username and password generates unique access token, valid for 24hrs.

image

  1. Adding access token to header

image

  1. Updating total orders

image

• /image

Structure: BASE_URL/image/${user_id}

Returns: object:{...user_image}

image

• /insert

Structure: BASE_URL/insert

Request Body: object:{user_details}

Returns: Some kind of success or failure message

  1. Creating a new user: Get Success message

image

  1. Adding user using duplicate user_name: Error: “Username already in use” image

• /delete

Structure: BASE_URL/delete/${user_id}

Returns: A success or failure message

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published