2019-01-18 18:03:45 +01:00
|
|
|
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> {
|
2019-02-01 17:56:55 +01:00
|
|
|
return this.http.post<ServiceModel>(this.actionUrl, serviceModel);
|
2019-01-18 18:03:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|