ajaynegi33 / ajaynegi33/LibraryMan-API

[BUG] Null Values Returned for Book and Member When Borrowing a Book

未關閉
#23 9 則留言 0 個 reaction 已指派 1 人 已被 @shreyamaheshwari1 認領 在 GitHub 檢視
bug good first issue gssoc gssoc-ext hacktoberfest hacktoberfest-accepted level1 status: ready for dev
主要語言
Java
星號
54
分支
53
PR 合併指標
30 天內沒有已合併 PR

描述

### Is this a new issue?

- [x] I have searched "open" and "closed" issues, and this is not a duplicate.

### Bug Description

When borrowing a book via the POST request to http://localhost:8080/api/borrowings, the response contains null values for both the book and member details. The expected behavior is to return the complete details of the book and member, but instead, the following response is received:
```json
{
"borrowingId": 1,
"book": {
"bookId": 2,
"title": null,
"author": null,
"isbn": null,
"publisher": null,
"publishedYear": 0,
"genre": null,
"copiesAvailable": 0
},
"fine": null,
"member": {
"memberId": 2,
"name": null,
"email": null,
"password": null,
"role": null,
"membershipDate": null
},
"borrowDate": "2024-09-05T17:37:49.623+00:00",
"dueDate": "2024-09-20T17:37:49.623+00:00",
"returnDate": null
}
```

### Steps to Reproduce

1. Borrow a book by sending a POST request to http://localhost:8080/api/borrowings with valid book and member data.
2. Check the response body for book and member details.

### Expected Behavior
- The response should contain the correct book and member details, such as title, author, ISBN, and member name, email, etc.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。