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:
@@ -57,10 +57,12 @@ ipcMain.handle('db:character:attribute:add', createHandler<AddAttributeData, str
|
||||
// DELETE /character/attribute/delete - Delete character attribute
|
||||
interface DeleteAttributeData {
|
||||
attributeId: string;
|
||||
bookId: string;
|
||||
deletedAt: number;
|
||||
}
|
||||
ipcMain.handle('db:character:attribute:delete', createHandler<DeleteAttributeData, boolean>(
|
||||
function(userId: string, data: DeleteAttributeData, lang: 'fr' | 'en'): boolean {
|
||||
return Character.deleteAttribute(userId, data.attributeId, lang);
|
||||
return Character.deleteAttribute(userId, data.bookId, data.attributeId, data.deletedAt, lang);
|
||||
}
|
||||
)
|
||||
);
|
||||
@@ -79,10 +81,12 @@ ipcMain.handle('db:character:update', createHandler<UpdateCharacterData, boolean
|
||||
// DELETE /character/delete - Delete character
|
||||
interface DeleteCharacterData {
|
||||
characterId: string;
|
||||
bookId: string;
|
||||
deletedAt: number;
|
||||
}
|
||||
ipcMain.handle('db:character:delete', createHandler<DeleteCharacterData, boolean>(
|
||||
function(userId: string, data: DeleteCharacterData, lang: 'fr' | 'en'): boolean {
|
||||
return Character.deleteCharacter(userId, data.characterId, lang);
|
||||
return Character.deleteCharacter(userId, data.bookId, data.characterId, data.deletedAt, lang);
|
||||
}
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user