From f0c6a4e05996cf8791ff06ec98d15963c3e5eeea Mon Sep 17 00:00:00 2001 From: white Date: Tue, 12 Mar 2024 11:07:14 +0100 Subject: [PATCH] fix: find function rec sess --- .../recruitment-session/recruitment-session.service.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/src/recruitment-session/recruitment-session.service.ts b/api/src/recruitment-session/recruitment-session.service.ts index a8d94c5..5140186 100644 --- a/api/src/recruitment-session/recruitment-session.service.ts +++ b/api/src/recruitment-session/recruitment-session.service.ts @@ -30,15 +30,15 @@ export class RecruitmentSessionService { return await this.recruitmentSessionRepository.find(); } - async findRecruitmentSessionById(id: number): Promise { - return await this.recruitmentSessionRepository.findOne({ where: { id } }); + async findRecruitmentSessionById(id: number): Promise { + return await this.recruitmentSessionRepository.findBy({ id }); } // Modifit here if you want to assume to have more than a Recruitment Session // active at the same time. Tests assume there is only one now. - async findActiveRecruitmentSession(): Promise { - return await this.recruitmentSessionRepository.findOne({ - where: { state: RecruitmentSessionState.Active }, + async findActiveRecruitmentSession(): Promise { + return await this.recruitmentSessionRepository.findBy({ + state: RecruitmentSessionState.Active, }); }