summaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.service.ts
blob: 566339db8a2bad2d52e6a3246414591d1ae4419e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import {Injectable} from '@angular/core';
import {ApiService} from '../../../../common/core/services/api.typed.service';
import {BlueprintURLs} from '../../../../common/constants/app-constants';
import {Observable} from 'rxjs';
import {BluePrintDetailModel} from '../model/BluePrint.detail.model';


@Injectable({
    providedIn: 'root'
})
export class ConfigurationDashboardService {
    constructor(private api: ApiService<BluePrintDetailModel>) {

    }

    getBluePrintModel(id: string): Observable<BluePrintDetailModel> {
        return this.api.getOne(BlueprintURLs.getOneBlueprint + '/' + id);
    }


    public downloadResource(id: string) {
        return this.api.getCustomized(id, {responseType: 'blob'});
    }

}