Add response headers for real fix

This commit is contained in:
2025-06-25 20:56:04 -07:00
parent efab9bfa5d
commit f4133bc72d
@@ -31,10 +31,9 @@ export class ForgotPasswordComponent {
const body = new HttpParams() const body = new HttpParams()
.set("Email", this.email) .set("Email", this.email)
const headers = new HttpHeaders({ 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, responseType: "text" } ).subscribe({
this.http.post<string>( "https://mistox.com/api/account/sendresetpassword", body, { headers } ).subscribe({
next: (data) => { next: (data) => {
if (data.trim() == "Success"){ if (data.trim() == "Success"){
this.errorMsgs = ["Reset password send"]; this.errorMsgs = ["Reset password send"];
@@ -47,9 +46,5 @@ export class ForgotPasswordComponent {
console.log("HTTP Error Signing In: ", err); console.log("HTTP Error Signing In: ", err);
} }
}); });
}catch(err){
this.errorMsgs.push("http error: " + err);
}
} }
} }