feat: plugins v1.5
This commit is contained in:
14
electron/cqrs/commands/handlers/deletePluginData.ts
Normal file
14
electron/cqrs/commands/handlers/deletePluginData.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { DataSource } from 'typeorm';
|
||||
import { PluginDataEntity } from '../../../entities';
|
||||
import { DeletePluginDataCommand } from '../../types';
|
||||
|
||||
export async function handleDeletePluginData(command: DeletePluginDataCommand, dataSource: DataSource): Promise<void> {
|
||||
const { payload } = command;
|
||||
|
||||
await dataSource.getRepository(PluginDataEntity).delete({
|
||||
key: payload.key,
|
||||
pluginId: payload.pluginId,
|
||||
scope: payload.scope,
|
||||
serverId: payload.serverId ?? ''
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user