This commit is contained in:
2025-12-16 21:05:01 +01:00
parent f61e3a4e5a
commit 7532c7ed6d
207 changed files with 7861 additions and 2606 deletions

View File

@@ -1,13 +1,16 @@
import type { ITeamMembershipRepository } from '../../domain/repositories/ITeamMembershipRepository';
import type { RejectTeamJoinRequestCommandDTO } from '../dto/TeamCommandAndQueryDTO';
import { Result } from '@core/shared/application/Result';
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
export class RejectTeamJoinRequestUseCase {
constructor(
private readonly membershipRepository: ITeamMembershipRepository,
) {}
async execute(command: RejectTeamJoinRequestCommandDTO): Promise<void> {
async execute(command: RejectTeamJoinRequestCommandDTO): Promise<Result<void, ApplicationErrorCode<'NO_ERROR'>>> {
const { requestId } = command;
await this.membershipRepository.removeJoinRequest(requestId);
return Result.ok(undefined);
}
}