diff --git a/WebApp/backend/QuizMaster.API.Account/Configuration/ApplicationSettings.cs b/WebApp/backend/QuizMaster.API.Account/Configuration/ApplicationSettings.cs index b9268d7b..9314d0cf 100644 --- a/WebApp/backend/QuizMaster.API.Account/Configuration/ApplicationSettings.cs +++ b/WebApp/backend/QuizMaster.API.Account/Configuration/ApplicationSettings.cs @@ -8,5 +8,6 @@ public class ApplicationSettings public string RabbitMq_Hostname { get; set; } public string SMTP_EMAIL { get; set; } public string SMTP_PASSWORD { get; set; } + public string GatewayHost { get; set; } } } diff --git a/WebApp/backend/QuizMaster.API.Account/Service/EmailSenderService.cs b/WebApp/backend/QuizMaster.API.Account/Service/EmailSenderService.cs index d51f916f..65de54b1 100644 --- a/WebApp/backend/QuizMaster.API.Account/Service/EmailSenderService.cs +++ b/WebApp/backend/QuizMaster.API.Account/Service/EmailSenderService.cs @@ -52,7 +52,7 @@ password. Click the button below to reset your password. cursor: pointer; text-decoration: none; "" - href='https://localhost:7081/gateway/api/account/update_password/{token}' + href='{_settings.GatewayHost}/gateway/api/account/update_password/{token}' >                Confirm Reset Password                diff --git a/WebApp/backend/QuizMaster.API.Account/appsettings.json b/WebApp/backend/QuizMaster.API.Account/appsettings.json index a1563aa6..eb4a3d69 100644 --- a/WebApp/backend/QuizMaster.API.Account/appsettings.json +++ b/WebApp/backend/QuizMaster.API.Account/appsettings.json @@ -14,6 +14,7 @@ "RabbitMq_Account_RequestQueueName": "QuizMasterRequestQueue", "RabbitMq_Account_ResponseQueueName": "QuizMasterResponseQueue", "RabbitMq_Hostname": "localhost", + "GatewayHost": "https://localhost:7081", "Service_MonitoringGRPC": "https://localhost:7065", "SMTP_EMAIL": "jabejar@fullscale.io", /* TEMP, WILL DELETE THE CRED IN FUTURE */ "SMTP_PASSWORD": "dzsw pzja rmzu axyq" /* TEMP, WILL DELETE THE CRED IN FUTURE */ diff --git a/WebApp/backend/QuizMaster.API.Gatewway/Controllers/AccountGatewayController.cs b/WebApp/backend/QuizMaster.API.Gatewway/Controllers/AccountGatewayController.cs index 66793008..8d3af21e 100644 --- a/WebApp/backend/QuizMaster.API.Gatewway/Controllers/AccountGatewayController.cs +++ b/WebApp/backend/QuizMaster.API.Gatewway/Controllers/AccountGatewayController.cs @@ -389,9 +389,11 @@ public async Task ConfirmUpdatePassword(string token) if (response.Code != 200) { - return BadRequest(new ResponseDto { Type = "Error", Message = response.Message }); + //return BadRequest(new ResponseDto { Type = "Error", Message = response.Message }); + return BadRequest("

Failed to update password, either token has expired or this link has already been consumed.

TODO: UI design

"); } - return Ok(new ResponseDto { Type = "Success", Message = response.Message }); + //return Ok(new ResponseDto { Type = "Success", Message = response.Message }); + return Ok("

Password was successfully updated

TODO: UI design

"); } [QuizMasterAdminAuthorization]