13 lines
507 B
TypeScript
13 lines
507 B
TypeScript
import type { ITeamMembershipRepository } from '../../domain/repositories/ITeamMembershipRepository';
|
|
import type { RejectTeamJoinRequestCommandDTO } from '../dto/TeamCommandAndQueryDTO';
|
|
|
|
export class RejectTeamJoinRequestUseCase {
|
|
constructor(
|
|
private readonly membershipRepository: ITeamMembershipRepository,
|
|
) {}
|
|
|
|
async execute(command: RejectTeamJoinRequestCommandDTO): Promise<void> {
|
|
const { requestId } = command;
|
|
await this.membershipRepository.removeJoinRequest(requestId);
|
|
}
|
|
} |