31 lines
1.3 KiB
TypeScript
31 lines
1.3 KiB
TypeScript
|
import 'rxjs/add/operator/map';
|
||
|
import { HttpHeaders } from '@angular/common/http';
|
||
|
import { Injectable } from '@angular/core';
|
||
|
import { HostConfiguration } from './../../app.constants';
|
||
|
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
|
||
|
import { Observable } from 'rxjs/Observable';
|
||
|
import { DataManagementPlanModel } from '../../models/data-managemnt-plans/DataManagementPlanModel';
|
||
|
import { DataManagementPlanCriteria } from '../../models/criteria/data-management-plan/DataManagementPlanCriteria';
|
||
|
import { RequestItem } from '../../models/criteria/RequestItem';
|
||
|
|
||
|
|
||
|
@Injectable()
|
||
|
export class DatasetWizardService {
|
||
|
|
||
|
private actionUrl: string;
|
||
|
private headers: HttpHeaders;
|
||
|
|
||
|
constructor(private http: BaseHttpService) {
|
||
|
|
||
|
this.actionUrl = HostConfiguration.Server + 'datasetwizard/';
|
||
|
|
||
|
this.headers = new HttpHeaders();
|
||
|
this.headers = this.headers.set('Content-Type', 'application/json');
|
||
|
this.headers = this.headers.set('Accept', 'application/json');
|
||
|
}
|
||
|
|
||
|
public userDmps(criteria: RequestItem<DataManagementPlanCriteria>): Observable<DataManagementPlanModel[]> {
|
||
|
return this.http.post<DataManagementPlanModel[]>(this.actionUrl + 'userDmps', criteria, { headers: this.headers });
|
||
|
}
|
||
|
}
|