☑Kizspy.me
}
"dueDate": "2025-05-10"
• Response Example:
{
}
"_id": "6621eeff6677889900aabbcc",
"user": "6621ccddee00112233445566",
"book": "66211aaa12bcab1234567890",
"borrowDate": "2025-04-23T00:00:00.000Z",
"dueDate": "2025-05-10T00:00:00.000Z",
"returned": false
Question 5 (2 points) - Return a Book (Requires JWT)
Objective:
Build an authenticated API for users to return a book. Mark the borrow record as returned
and increase the book's availableCopies by 1.
• Endpoint: POST /api/borrow/return/:id
Zoom
+ 100%
Close