Skip to content

Commit 5905880

Browse files
Update API_DOCUMENTATION.md
1 parent ddc6ae4 commit 5905880

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

API_DOCUMENTATION.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ Retrieves a specific genre by its ID.
290290
| POST | `/admin/return/{loanId}`| Return a book (as admin) | Admin |
291291
| DELETE | `/admin/loans/{loanId}`| Delete a loan | Admin |
292292

293+
**Note:** LoanStatus can be `LOANED` or `RETURNED`
294+
293295
### GET /loans
294296
Returns a paginated and sorted list of all loans for the authenticated user.
295297

@@ -340,10 +342,8 @@ Returns a loaned book.
340342
{
341343
"userId": 1,
342344
"bookId": 1,
343-
"loanDate": "2025-01-01",
344-
"dueDate": "2025-01-15",
345-
"returnDate": null,
346-
"loanStatus": "ACTIVE"
345+
"returned": "YYYY-MM-DDTHH:MM:SS",
346+
"loanStatus": "RETURNED"
347347
}
348348
```
349349

@@ -355,10 +355,8 @@ Returns a loaned book.
355355
{
356356
"userId": 1,
357357
"bookId": 1,
358-
"loanDate": "2025-01-01",
359-
"dueDate": "2025-01-15",
360-
"returnDate": null,
361-
"loanStatus": "ACTIVE"
358+
"returned": null,
359+
"loanStatus": "LOANED"
362360
}
363361
```
364362

0 commit comments

Comments
 (0)