Skip to content

Commit

Permalink
Ref: Urgent Link change to Gateway Hostname, for reset password
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymar921 committed Jan 22, 2024
1 parent e682f13 commit aa18788
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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               
Expand Down
1 change: 1 addition & 0 deletions WebApp/backend/QuizMaster.API.Account/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,11 @@ public async Task<IActionResult> 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("<html><body><h1>Failed to update password, either token has expired or this link has already been consumed.</h1><p>TODO: UI design</p></body></html>");
}
return Ok(new ResponseDto { Type = "Success", Message = response.Message });
//return Ok(new ResponseDto { Type = "Success", Message = response.Message });
return Ok("<html><body><h1>Password was successfully updated</h1><p>TODO: UI design</p></body></html>");
}

[QuizMasterAdminAuthorization]
Expand Down

0 comments on commit aa18788

Please sign in to comment.