forgot password updates

This commit is contained in:
Cyril Joseph 2025-07-10 13:16:23 -03:00
parent 3101a46c28
commit f3864cb5ae

View File

@ -50,7 +50,7 @@ export class AuthService {
} }
register(email: string, password: string): Observable<any> { register(email: string, password: string): Observable<any> {
return this.http.post( return this.http.post(
`${this.apiUrl}/register`, `${this.apiUrl}/register`,
{ P_EMAILADDR: email, P_PASSWORD: password } { P_EMAILADDR: email, P_PASSWORD: password }
@ -58,13 +58,13 @@ export class AuthService {
} }
forgotPassword(email: string, password: string, token: string): Observable<any> { forgotPassword(email: string, password: string, token: string): Observable<any> {
let headers = new HttpHeaders(); let headers = new HttpHeaders();
if (token) { if (token) {
headers = headers.set('Authorization', `Bearer ${token}`); headers = headers.set('Authorization', `Bearer ${token}`);
} }
return this.http.post( return this.http.put(
`${this.apiUrl}/forgot-password`, `${this.apiUrl}/forgot-password`,
{ P_EMAILADDR: email, P_PASSWORD: password }, { P_EMAILADDR: email, P_PASSWORD: password },
{ headers } { headers }