wip
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import type { ITeamMembershipRepository } from '../../domain/repositories/ITeamMembershipRepository';
|
||||
import type { TeamJoinRequest } from '../../domain/entities/Team';
|
||||
import type { GetTeamJoinRequestsQueryParamsDTO } from '../dto/TeamCommandAndQueryDTO';
|
||||
|
||||
export class GetTeamJoinRequestsQuery {
|
||||
constructor(
|
||||
private readonly membershipRepository: ITeamMembershipRepository,
|
||||
) {}
|
||||
|
||||
async execute(params: GetTeamJoinRequestsQueryParamsDTO): Promise<TeamJoinRequest[]> {
|
||||
const { teamId } = params;
|
||||
return this.membershipRepository.getJoinRequests(teamId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user