Skip to content

Commit 18b9e20

Browse files
AndreiaPenayaf
andcommitted
♻️ api: uncancel certification course after scoring (for V2 certifications)
Co-authored-by: Yannick François <yannick.francois@pix.fr>
1 parent f0fc529 commit 18b9e20

File tree

1 file changed

+5
-5
lines changed
  • api/src/certification/session-management/domain/usecases

1 file changed

+5
-5
lines changed

api/src/certification/session-management/domain/usecases/cancel.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ export const cancel = async function ({
2727
throw new NotFinalizedSessionError();
2828
}
2929

30-
certificationCourse.cancel();
31-
await certificationCourseRepository.update({ certificationCourse });
32-
3330
const certificationCancelledEvent = new CertificationCancelled({
34-
certificationCourseId: certificationCourse.getId(),
31+
certificationCourseId,
3532
juryId,
3633
});
3734

38-
return certificationRescoringRepository.execute({ event: certificationCancelledEvent });
35+
await certificationRescoringRepository.execute({ event: certificationCancelledEvent });
36+
37+
certificationCourse.cancel();
38+
await certificationCourseRepository.update({ certificationCourse });
3939
};

0 commit comments

Comments
 (0)