2019-01-18 18:03:45 +01:00
|
|
|
import { Injectable } from '@angular/core';
|
|
|
|
import { environment } from '../../../../../environments/environment';
|
|
|
|
import { ResearcherModel } from '../../../model/researcher/researcher';
|
|
|
|
import { BaseHttpService } from '../../http/base-http.service';
|
2020-03-26 17:44:12 +01:00
|
|
|
import { ConfigurationService } from '../../configuration/configuration.service';
|
2019-01-18 18:03:45 +01:00
|
|
|
|
|
|
|
@Injectable()
|
|
|
|
export class ExternalResearcherService {
|
|
|
|
|
|
|
|
private actionUrl: string;
|
|
|
|
|
2020-03-26 17:44:12 +01:00
|
|
|
constructor(private http: BaseHttpService, private configurationService: ConfigurationService) {
|
|
|
|
this.actionUrl = configurationService.server + 'researchers/';
|
2019-01-18 18:03:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public createResearcher(researcher: ResearcherModel) {
|
2019-02-01 17:56:55 +01:00
|
|
|
return this.http.post(this.actionUrl, researcher);
|
2019-01-18 18:03:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|