feat: add current password field to change password form and update service payload structure

This commit is contained in:
2026-06-11 17:53:06 +03:30
parent b4cd4c05f2
commit 72954fb5d1
8 changed files with 74 additions and 25 deletions
+7 -2
View File
@@ -2,13 +2,18 @@ import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
interface IChangePasswordSubmitPayload {
currentPassword: string;
password: string;
}
@Injectable({
providedIn: 'root',
})
export class PosChangePasswordService {
constructor(private readonly http: HttpClient) {}
changePassword(password: string): Observable<unknown> {
return this.http.put('/api/v1/pos/update-password', { password });
changePassword(payload: IChangePasswordSubmitPayload): Observable<unknown> {
return this.http.put('/api/v1/pos/update-password', payload);
}
}