diff options
Diffstat (limited to 'code/api/src/Endpoints/Internal/Root/ValidateRoute.cs')
| -rw-r--r-- | code/api/src/Endpoints/Internal/Root/ValidateRoute.cs | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/code/api/src/Endpoints/Internal/Root/ValidateRoute.cs b/code/api/src/Endpoints/Internal/Root/ValidateRoute.cs index d8ec85a..f141fe9 100644 --- a/code/api/src/Endpoints/Internal/Root/ValidateRoute.cs +++ b/code/api/src/Endpoints/Internal/Root/ValidateRoute.cs @@ -6,8 +6,7 @@ public class ValidateRoute : RouteBaseSync.WithRequest<ValidateRoute.QueryParams private readonly string CanonicalFrontendUrl; private readonly ILogger<ValidateRoute> _logger; - public ValidateRoute(EmailValidationService emailValidation, ILogger<ValidateRoute> logger) - { + public ValidateRoute(EmailValidationService emailValidation, ILogger<ValidateRoute> logger) { _emailValidation = emailValidation; _logger = logger; CanonicalFrontendUrl = Program.AppConfiguration.CANONICAL_FRONTEND_URL; @@ -20,20 +19,18 @@ public class ValidateRoute : RouteBaseSync.WithRequest<ValidateRoute.QueryParams } [HttpGet("~/_/validate")] - public override ActionResult Handle([FromQuery] QueryParams request) - { + public override ActionResult Handle([FromQuery] QueryParams request) { var isFulfilled = _emailValidation.FulfillEmailValidationRequest(request.Id, LoggedInUser.Id); - if (!isFulfilled) - { + if (!isFulfilled) { _logger.LogError("Email validation fulfillment failed for request {requestId} and user {userId}", request.Id, LoggedInUser.Id); return StatusCode(400, $""" -<html> -<body> -<h3>The validation could not be completed</h3> -<p>We are working on fixing this, in the meantime, have patience.</p> -<a href="{CanonicalFrontendUrl}">Click here to go back to {CanonicalFrontendUrl}</a> -</body> -"""); + <html> + <body> + <h3>The validation could not be completed</h3> + <p>We are working on fixing this, in the meantime, have patience.</p> + <a href="{CanonicalFrontendUrl}">Click here to go back to {CanonicalFrontendUrl}</a> + </body> + """); } return Redirect(CanonicalFrontendUrl + "/portal?msg=emailValidated"); |
