You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
argos/dmp-frontend/src/app/services/researchers/researchers.service.ts

27 lines
872 B
TypeScript

import { HttpHeaders } from '@angular/common/http';
5 years ago
import { Injectable } from '@angular/core';
import { environment } from '../../../environments/environment';
6 years ago
import { ResearcherModel } from '../../models/researcher/ResearcherModel';
5 years ago
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
@Injectable()
export class ResearcherService {
private actionUrl: string;
private headers: HttpHeaders;
constructor(private http: BaseHttpService) {
5 years ago
this.actionUrl = environment.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 });
}
}