Fix Password reset Timeout
This commit is contained in:
@@ -312,7 +312,7 @@ namespace MistoxWebsite.Server.Controllers {
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<ActionResult<string>> ResetPassword( [FromBody] Account request ) {
|
public async Task<ActionResult<string>> ResetPassword( [FromBody] Account request ) {
|
||||||
try {
|
try {
|
||||||
string key = "p" + request.UserName;
|
string key = "p" + request.Email.ToLower();
|
||||||
// Stop from sending multiple emails quickly
|
// Stop from sending multiple emails quickly
|
||||||
if ( _emailContext._SentEmails.ContainsKey(key) ){
|
if ( _emailContext._SentEmails.ContainsKey(key) ){
|
||||||
DateTime PreviousSentTime = _emailContext._SentEmails.GetValueOrDefault(key);
|
DateTime PreviousSentTime = _emailContext._SentEmails.GetValueOrDefault(key);
|
||||||
|
|||||||
Reference in New Issue
Block a user