☑Kizspy.me
• Endpoint: POST /api/borrow/return/:id
Headers:
Authorization: Bearer <JWT_TOKEN>
• Processing Requirements:
。 Verify the borrow record exists and belongs to the logged-in user.
o Update the borrow record with returned: true and returnDate: new Date().
o Increase book.availableCopies by 1.
• Response Example:
}
{
"message": "Book returned successfully.",
"returnDate": "2025-04-23T13:00:00.000Z"
B5-2025
----END---
Zoom
- FUO
+ 100%
Close