Skip to content

nisalVD/purchase-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discount Engine

App is deployed Purchase Engine

How to use

To run tests do

npm run test

to run dev

npm run dev

routes

  POST /.netlify/functions/login

expected body,

{
  "email": "hello@example.com",
  "password": "password"
}

can login with details above to get a jwt with bangaroo sydney to test out the $100 discount

  POST /.netlify/functions/purchase

expected headers

  Authorization: Bearer <token>

expected body

{
  "price": 10003.23,
  "description": "this is a purchase",
  "productSKU": "foo"
}

POST /.netlify/functions/signup

expected body

{
  "email": "person@example.com",
  "password": "abc123",
  "name": "person",
  "phoneNumber": "1232131",
  "deliveryAddress": "100 bar street"
}

will return a jwt with the specified fields

postman workspace to try out the requests Workspace

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published