10 lines
352 B
TypeScript
10 lines
352 B
TypeScript
import { DataSource } from 'typeorm';
|
|
import { BanEntity } from '../../../entities';
|
|
import { RemoveBanCommand } from '../../types';
|
|
|
|
export async function handleRemoveBan(command: RemoveBanCommand, dataSource: DataSource): Promise<void> {
|
|
const repo = dataSource.getRepository(BanEntity);
|
|
|
|
await repo.delete({ oderId: command.payload.oderId });
|
|
}
|