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:
@@ -90,10 +90,12 @@ ipcMain.handle('db:location:section:update', createHandler<UpdateSectionWithSeri
|
||||
// DELETE /location/delete - Delete location section
|
||||
interface DeleteLocationData {
|
||||
locationId: string;
|
||||
bookId: string;
|
||||
deletedAt: number;
|
||||
}
|
||||
ipcMain.handle('db:location:delete', createHandler<DeleteLocationData, boolean>(
|
||||
function(userId: string, data: DeleteLocationData, lang: 'fr' | 'en'): boolean {
|
||||
return Location.deleteLocationSection(userId, data.locationId, lang);
|
||||
return Location.deleteLocationSection(userId, data.bookId, data.locationId, data.deletedAt, lang);
|
||||
}
|
||||
)
|
||||
);
|
||||
@@ -101,10 +103,12 @@ ipcMain.handle('db:location:delete', createHandler<DeleteLocationData, boolean>(
|
||||
// DELETE /location/element/delete - Delete location element
|
||||
interface DeleteLocationElementData {
|
||||
elementId: string;
|
||||
bookId: string;
|
||||
deletedAt: number;
|
||||
}
|
||||
ipcMain.handle('db:location:element:delete', createHandler<DeleteLocationElementData, boolean>(
|
||||
function(userId: string, data: DeleteLocationElementData, lang: 'fr' | 'en'): boolean {
|
||||
return Location.deleteLocationElement(userId, data.elementId, lang);
|
||||
return Location.deleteLocationElement(userId, data.bookId, data.elementId, data.deletedAt, lang);
|
||||
}
|
||||
)
|
||||
);
|
||||
@@ -112,10 +116,12 @@ ipcMain.handle('db:location:element:delete', createHandler<DeleteLocationElement
|
||||
// DELETE /location/sub-element/delete - Delete location sub-element
|
||||
interface DeleteLocationSubElementData {
|
||||
subElementId: string;
|
||||
bookId: string;
|
||||
deletedAt: number;
|
||||
}
|
||||
ipcMain.handle('db:location:subelement:delete', createHandler<DeleteLocationSubElementData, boolean>(
|
||||
function(userId: string, data: DeleteLocationSubElementData, lang: 'fr' | 'en'): boolean {
|
||||
return Location.deleteLocationSubElement(userId, data.subElementId, lang);
|
||||
return Location.deleteLocationSubElement(userId, data.bookId, data.subElementId, data.deletedAt, lang);
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user