This commit is contained in:
2025-06-25 20:17:01 -07:00
parent b9c9fcbcb2
commit 634a1f3a64
2 changed files with 6 additions and 5 deletions
@@ -39,7 +39,7 @@ export class ForgotPasswordComponent {
});
this.http.post<string>( "https://mistox.com/api/account/sendresetpassword", body, { headers } ).subscribe({
next: async (data) => {
if (data == "Success"){
if (data.trim() == "Success"){
this.errorMsgs = ["Reset password send"];
await this.sleep(3000);
this.router.navigate([this.returnURL]);
@@ -50,15 +50,16 @@ export class ResetPasswordComponent {
const headers = new HttpHeaders({
'Content-Type': 'application/x-www-form-urlencoded'
});
this.http.post<string>( "https://mistox.com/api/account/sendresetpassword", body, { headers } ).subscribe({
this.http.post<boolean>( "https://mistox.com/api/account/resetpassword", body, { headers } ).subscribe({
next: async (data) => {
if (data == "true"){
if (data == true){
this.errorMsgs = ["Password reset successfully"];
await this.sleep(3000);
this.router.navigate(["/account/login"]);
}else{
this.errorMsgs = [];
this.errorMsgs.push(data);
this.errorMsgs = ["An error has ocurred"];
await this.sleep(3000);
this.router.navigate(["/account/sendresetpassword"]);
}
},
error: err => {