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.
mohemmhmg/Mohem/src/app/absence/service/add-attach-service.ts

28 lines
829 B
TypeScript

import { Injectable } from "@angular/core";
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
import { ConnectorService } from "src/app/hmg-common/services/connector/connector.service";
import { Observable } from "rxjs";
@Injectable()
export class AddAttachService {
public static addAttachment = "Services/ERP.svc/REST/ADD_ATTACHMENT";
constructor(
public api: ConnectorService,
public authService: AuthenticationService
) {}
public addAttachment(
addAttachrequest: any,
onError?: any,
errorLabel?: string
): Observable<any> {
const request = addAttachrequest;
this.authService.authenticateRequest(request);
return this.api.post(
AddAttachService.addAttachment,
request,
onError,
errorLabel
);
}
}