You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
909 B
TypeScript
26 lines
909 B
TypeScript
|
6 years ago
|
import { Injectable } from '@angular/core';
|
||
|
|
import { Observable } from "rxjs";
|
||
|
|
import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
|
||
|
|
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
|
||
|
|
@Injectable({
|
||
|
|
providedIn: 'root'
|
||
|
|
})
|
||
|
|
export class ProfileService {
|
||
|
|
public static updateEmpImage ="Services/ERP.svc/REST/UPDATE_EMPLOYEE_IMAGE";
|
||
|
|
constructor(
|
||
|
|
public api: ConnectorService,
|
||
|
|
public authService: AuthenticationService
|
||
|
|
) {}
|
||
|
|
|
||
|
|
public updateImageProfile( updateImgRequest: any,onError?: any,errorLabel?: string
|
||
|
|
): Observable<any> {
|
||
|
|
const request = updateImgRequest;
|
||
|
|
this.authService.authenticateRequest(request);
|
||
|
|
return this.api.post(
|
||
|
|
ProfileService.updateEmpImage,
|
||
|
|
request,
|
||
|
|
onError,
|
||
|
|
errorLabel
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|