Refacor electron app and add migrations
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { DataSource } from 'typeorm';
|
||||
import { AttachmentEntity } from '../../../entities';
|
||||
import { DeleteAttachmentsForMessageCommand } from '../../types';
|
||||
|
||||
export async function handleDeleteAttachmentsForMessage(command: DeleteAttachmentsForMessageCommand, dataSource: DataSource): Promise<void> {
|
||||
const repo = dataSource.getRepository(AttachmentEntity);
|
||||
|
||||
await repo.delete({ messageId: command.payload.messageId });
|
||||
}
|
||||
Reference in New Issue
Block a user