47 lines
998 B
TypeScript
47 lines
998 B
TypeScript
import { Component, Input, OnInit, AfterViewChecked, ViewChild } from '@angular/core';
|
|
import { HttpClient , HttpHeaders, HttpParams} from '@angular/common/http';
|
|
import { TokenService, TokenProvider } from './login/token.service'
|
|
import { Injectable } from '@angular/core';
|
|
import { Toolbox } from '../services/toolbox';
|
|
import {RestBase} from './rest-base';
|
|
import 'rxjs/Rx';
|
|
|
|
|
|
@Injectable()
|
|
export class ResearcherService implements OnInit {
|
|
|
|
|
|
constructor(public restBase: RestBase) {
|
|
}
|
|
|
|
ngOnInit(){
|
|
|
|
}
|
|
|
|
getResearcherIdsLabels() {
|
|
return this.restBase.get("researcher/listAllLabelIDs");
|
|
}
|
|
|
|
getResearcherIds(){
|
|
return this.restBase.get("researchers");
|
|
}
|
|
|
|
getAllResearchers(){
|
|
return this.restBase.get("researcher/getAll");
|
|
}
|
|
|
|
create(researcher){
|
|
return this.restBase.post("researcher/create", researcher);
|
|
}
|
|
|
|
|
|
delete(researcherID){
|
|
var researcher = {"id": researcherID};
|
|
return this.restBase.post("researcher/delete", researcher);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|