Refactor Book model and related components for consistent property naming

- Replaced `id` with `bookId` in `BookProps` and updated corresponding references.
- Added `tools` property to book-related components for tool management.
- Removed unused `books` property from `User` model.
- Added debug logs in `deleteBook` and `BookList` for troubleshooting.
This commit is contained in:
natreex
2026-01-15 17:22:59 -05:00
parent 3d4feaa680
commit ac968b7764
5 changed files with 7 additions and 12 deletions

View File

@@ -44,7 +44,6 @@ export interface UserInfoResponse {
groupId: number;
termsAccepted: boolean;
guideTour: GuideTour[];
books: BookSummary[];
}
/**
@@ -105,7 +104,6 @@ export default class User {
public static async returnUserInfos(userId: string): Promise<UserInfoResponse> {
const user: User = new User(userId);
await user.getUserInfos();
const userBooks: BookProps[] = await Book.getBooks(userId);
const guideTourStatus: GuideTour[] = [];
return {
id: user.getId(),
@@ -118,13 +116,6 @@ export default class User {
groupId: user.getGroupId(),
termsAccepted: user.isTermsAccepted(),
guideTour: guideTourStatus,
books: userBooks.map((book: BookProps): BookSummary => {
return {
bookId: book.id,
title: book.title,
subTitle: book.subTitle,
};
})
};
}