App is deployed Purchase Engine
To run tests do
npm run test
to run dev
npm run dev
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