diff --git a/src/MistoxWebsite.Client/src/app/pages/account/forgotpassword/forgotpassword.component.ts b/src/MistoxWebsite.Client/src/app/pages/account/forgotpassword/forgotpassword.component.ts index 41189e0..1b8ebf5 100644 --- a/src/MistoxWebsite.Client/src/app/pages/account/forgotpassword/forgotpassword.component.ts +++ b/src/MistoxWebsite.Client/src/app/pages/account/forgotpassword/forgotpassword.component.ts @@ -31,25 +31,20 @@ export class ForgotPasswordComponent { const body = new HttpParams() .set("Email", this.email) const headers = new HttpHeaders({ - 'Content-Type': 'application/x-www-form-urlencoded' + 'Content-Type': 'application/x-www-form-urlencoded', }); - try{ - this.http.post( "https://mistox.com/api/account/sendresetpassword", body, { headers } ).subscribe({ - next: (data) => { - if (data.trim() == "Success"){ - this.errorMsgs = ["Reset password send"]; - setTimeout(() => { this.router.navigate([this.returnURL]); }, 3000); - }else{ - this.errorMsgs = [data]; - } - }, - error: err => { - console.log("HTTP Error Signing In: ", err); - } - }); - }catch(err){ - this.errorMsgs.push("http error: " + err); - } - + this.http.post( "https://mistox.com/api/account/sendresetpassword", body, { headers, responseType: "text" } ).subscribe({ + next: (data) => { + if (data.trim() == "Success"){ + this.errorMsgs = ["Reset password send"]; + setTimeout(() => { this.router.navigate([this.returnURL]); }, 3000); + }else{ + this.errorMsgs = [data]; + } + }, + error: err => { + console.log("HTTP Error Signing In: ", err); + } + }); } } \ No newline at end of file