From a3c45ccc3aef4d5bcc4da7e0dc10728f5d85d47c Mon Sep 17 00:00:00 2001 From: Marco Villeneuve Date: Thu, 14 Dec 2023 11:08:11 -0800 Subject: [PATCH] Change for number of clicks. --- .../ca/bc/gov/educ/api/edx/service/v1/EdxUsersService.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/api/src/main/java/ca/bc/gov/educ/api/edx/service/v1/EdxUsersService.java b/api/src/main/java/ca/bc/gov/educ/api/edx/service/v1/EdxUsersService.java index a368d848..3714c3f1 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/edx/service/v1/EdxUsersService.java +++ b/api/src/main/java/ca/bc/gov/educ/api/edx/service/v1/EdxUsersService.java @@ -26,9 +26,7 @@ import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; -import java.time.LocalDate; import java.time.LocalDateTime; -import java.time.format.DateTimeParseException; import java.util.*; import java.util.stream.Collectors; @@ -755,7 +753,7 @@ public InstituteTypeCode expireUserActivationUrl(UUID userActivationValidationCo ApiError error = ApiError.builder().timestamp(LocalDateTime.now()).message("Invalid Link Provided").status(BAD_REQUEST).build(); throw new InvalidPayloadException(error); } - if (activationCodeEntities.stream().anyMatch(el -> el.getNumberOfClicks() >= 2)) { + if (activationCodeEntities.stream().anyMatch(el -> el.getNumberOfClicks() >= 5)) { ApiError error = ApiError.builder().timestamp(LocalDateTime.now()).message("This User Activation Link has already expired").status(GONE).build(); throw new InvalidPayloadException(error); }