20 lines
505 B
TypeScript
20 lines
505 B
TypeScript
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(payload: IChangePasswordSubmitPayload): Observable<unknown> {
|
|
return this.http.put('/api/v1/pos/update-password', payload);
|
|
}
|
|
}
|