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:
@@ -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=?';
|
||||
|
||||
Reference in New Issue
Block a user