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

21 lines
701 B
TypeScript
Raw Normal View History

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';
import { ConfigurationService } from '../../configuration/configuration.service';
2019-01-18 18:03:45 +01:00
@Injectable()
export class ExternalResearcherService {
private actionUrl: string;
constructor(private http: BaseHttpService, private configurationService: ConfigurationService) {
this.actionUrl = configurationService.server + 'researchers/';
2019-01-18 18:03:45 +01:00
}
public createResearcher(researcher: ResearcherModel) {
return this.http.post(this.actionUrl, researcher);
2019-01-18 18:03:45 +01:00
}
}