47 lines
968 B
TypeScript
47 lines
968 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 DatarepoService implements OnInit {
|
|
|
|
|
|
constructor(public restBase: RestBase) {
|
|
}
|
|
|
|
ngOnInit(){
|
|
|
|
}
|
|
|
|
getDatarepoIdsLabels() {
|
|
return this.restBase.get("datarepo/listAllLabelIDs");
|
|
}
|
|
|
|
getDatarepoIds(){
|
|
return this.restBase.get("datarepos");
|
|
}
|
|
|
|
getAllDatarepos(){
|
|
return this.restBase.get("datarepo/getAll");
|
|
}
|
|
|
|
create(datarepo){
|
|
return this.restBase.post("datarepo/create", datarepo);
|
|
}
|
|
|
|
|
|
delete(datarepoID){
|
|
var datarepo = {"id": datarepoID};
|
|
return this.restBase.post("datarepo/delete", datarepo);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|