Skip to content

JuanPabloLeber/CRM-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRM-service

The objective of this API is to manage customer data for a shop.

Build Setup

# install dependencies
$ npm install

# build with hot reload
$ npm run devStart

# build for production
$ npm run start

# NOTE: Remember to add your enviroment variables => 
        DATABASE_URL, SECRET, SALTROUNDS, PORT.  

API Endpoints

All the endpoints are preceeded by /app.

  • Auth

Verb Route Description Auth. Body Params Returns Notes
POST /auth/login Log in with email and password - email, password token, email, id -


  • User

Verb Route Description Auth. Body Params Returns Notes
GET /user Get a list of all Users Admin - List with all Users Pagination of 10 pages by default. It can be changed using query (limit and page)
GET /user/:userId Get an User by userId Admin - User -
POST /user Register a new User in the App Admin name, email, password, role User created -
PUT /user/:userId Update an User by id Admin name, email, password, role User updated -
DELETE /user/:userId Delete an User by userId Admin - User deleted -


  • Customer

Verb Route Description Auth. Body Params Returns Notes
GET /customer Get a list with all customers Admin, User - List with all Customers Pagination of 10 pages by default. It can be changed using query (limit and page)
GET /customer/:customerId Get a Customer by customerId Admin, User - Customer -
POST /customer Register a new Customer in the App Admin, User name, email, surname, photo, creator, lastModified Customer created -
PUT /customer/:customerId Update a Customer by id Admin, User name, email, surname, photo, creator, lastModified Customer updated -
DELETE /customer/:customerId Delete a Customer by userId Admin, User - Customer deleted -

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published