31 lines
1.2 KiB
TypeScript
31 lines
1.2 KiB
TypeScript
|
import { Invitation } from '../../models/invitation/Invitation';
|
||
|
import { UserInvitationCriteria } from '../../models/criteria/invitation/UserInvitationCriteria';
|
||
|
import { User } from '../../models/invitation/User';
|
||
|
import { HostConfiguration } from '../../app.constants';
|
||
|
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
|
||
|
import { Injectable } from "@angular/core";
|
||
|
import { HttpHeaders } from '@angular/common/http';
|
||
|
import { Observable } from 'rxjs/Observable';
|
||
|
import { RequestItem } from '../../models/criteria/RequestItem';
|
||
|
import { ResearcherModel } from '@app/models/researcher/ResearcherModel';
|
||
|
|
||
|
@Injectable()
|
||
|
export class ResearcherService {
|
||
|
|
||
|
private actionUrl: string;
|
||
|
private headers: HttpHeaders;
|
||
|
|
||
|
constructor(private http: BaseHttpService) {
|
||
|
|
||
|
this.actionUrl = HostConfiguration.Server + 'researchers/';
|
||
|
|
||
|
this.headers = new HttpHeaders();
|
||
|
this.headers = this.headers.set('Content-Type', 'application/json');
|
||
|
this.headers = this.headers.set('Accept', 'application/json');
|
||
|
}
|
||
|
|
||
|
public createResearcher(researcher: ResearcherModel) {
|
||
|
return this.http.post(this.actionUrl + "create", researcher, { headers: this.headers });
|
||
|
}
|
||
|
|
||
|
}
|