argos/dmp-frontend/src/app/core/services/external-sources/service/external-service.service.ts

20 lines
601 B
TypeScript

import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { environment } from '../../../../../environments/environment';
import { ServiceModel } from '../../../model/service/service';
import { BaseHttpService } from '../../http/base-http.service';
@Injectable()
export class ExternalServiceService {
private actionUrl: string;
constructor(private http: BaseHttpService) {
this.actionUrl = environment.Server + 'services/';
}
create(serviceModel: ServiceModel): Observable<ServiceModel> {
return this.http.post<ServiceModel>(this.actionUrl, serviceModel);
}
}