-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Intermediate30 Reward points30 Reward points
Description
Description
Users should be able to add new books to the website. Your task is to create an API endpoint following the below guidelines
Difficulty
- Intermediate
- 30 Points
API Endpoint
POST http://localhost:3000/books/
Controller
/controllers/books/addBook.js
Request Body
isbntitlesubtitledescriptionauthorpublisherpublishedOnpageswebsite
Response
{status : 200,
message : "New book added successfully"
book : {
"isbn":"9781593279509",
"title":"Eloquent JavaScript, Third Edition",
"subtitle":"A Modern Introduction to Programming",
"author":"Marijn Haverbeke",
"published":"2018-12-04T00:00:00.000Z",
"publisher":"No Starch Press",
"pages":472,
"description":"JavaScript lies at the heart of almost every modern web application, from social apps like Twitter to browser-based game frameworks like Phaser and Babylon. Though simple for beginners to pick up and play with, JavaScript is a flexible, complex language that you can use to build full-scale applications.",
"website":"http://eloquentjavascript.net/"
},Metadata
Metadata
Assignees
Labels
Intermediate30 Reward points30 Reward points