This project is RestAPI for HaloBuku.
To start local environment run yarn dev
- method:
POST - body:
{
"name": "John Doe",
"email": "[email protected]",
"password": "Password123"
}- method:
POST - body:
{
"email": "[email protected]",
"otp": 123456
}- method:
POST - body:
{
"email": "[email protected]",
"password": "Password123"
}- method:
POST - body:
{
_id: Number,
title: String,
author: String,
publishedYear: Number,
description: String,
image: String,
price: Number,
quantity: Number,
isAvailable: Boolean
}- method:
GET - body:
{
books: [
{
_id: Number,
title: String,
author: String,
publishedYear: Number,
description: String,
image: String,
price: Number,
quantity: Number,
isAvailable: Boolean,
},
];
}- method:
GET - body:
{
books: [
{
_id: Number,
title: String,
author: String,
publishedYear: Number,
description: String,
image: String,
price: Number,
quantity: Number,
isAvailable: Boolean,
},
];
}- method:
DELETE - parameter is book's ID
- method:
GET - cart:
{
_id: String;
cart: [
{
_id: Number,
title: String,
author: String,
publishedYear: Number,
description: String,
image: String,
price: Number,
quantity: Number,
isAvailable: Boolean,
},
];
}- method:
POST - parameter is book's ID
- method:
DELETE - parameter is book's ID
note: cart only can be accessed by auth user