Remove CharacterComponent and CharacterDetail components
- Deleted `CharacterComponent` and `CharacterDetail` files from the project. - Refactored related logic to improve code maintainability and reduce redundancy.
This commit is contained in:
@@ -120,11 +120,12 @@ ipcMain.handle('db:chapter:add', createHandler<AddChapterData, string>(
|
||||
// DELETE /chapter/remove - Remove chapter
|
||||
interface RemoveChapterData {
|
||||
chapterId: string;
|
||||
bookId?: string;
|
||||
bookId: string;
|
||||
deletedAt: number;
|
||||
}
|
||||
ipcMain.handle('db:chapter:remove', createHandler<RemoveChapterData, boolean>(
|
||||
function(userId: string, data: RemoveChapterData, lang: 'fr' | 'en'): boolean {
|
||||
return Chapter.removeChapter(userId, data.chapterId, lang);
|
||||
return Chapter.removeChapter(userId, data.bookId, data.chapterId, data.deletedAt, lang);
|
||||
}
|
||||
)
|
||||
);
|
||||
@@ -157,10 +158,12 @@ ipcMain.handle('db:chapter:information:add', createHandler<AddChapterInformation
|
||||
// DELETE /chapter/resume/remove - Remove chapter information
|
||||
interface RemoveChapterInfoData {
|
||||
chapterInfoId: string;
|
||||
bookId: string;
|
||||
deletedAt: number;
|
||||
}
|
||||
ipcMain.handle('db:chapter:information:remove', createHandler<RemoveChapterInfoData, boolean>(
|
||||
function(userId: string, data: RemoveChapterInfoData, lang: 'fr' | 'en'): boolean {
|
||||
return Chapter.removeChapterInformation(userId, data.chapterInfoId, lang);
|
||||
return Chapter.removeChapterInformation(userId, data.bookId, data.chapterInfoId, data.deletedAt, lang);
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user