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

@@ -260,6 +260,7 @@ export default class BookRepo {
* @returns true if the deletion was successful
*/
public static deleteBook(userId: string, bookId: string, lang: 'fr' | 'en'): boolean {
console.log(`Deleting book with ID ${bookId} for user ${userId}`)
try {
const db: Database = System.getDb();
const query: string = 'DELETE FROM erit_books WHERE author_id=? AND book_id=?';