Add response headers for real fix

This commit is contained in:
2025-06-25 20:56:04 -07:00
parent efab9bfa5d
commit f4133bc72d
@@ -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<string>( "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);
}
});
}
}