app-define.service.ts 668 B

1234567891011121314151617181920212223
  1. import { Injectable } from '@angular/core';
  2. import { HttpClient } from '@angular/common/http';
  3. import {Message} from "../pojo/Message";
  4. import {Observable} from "rxjs";
  5. import {ParamDefine} from "../pojo/ParamDefine";
  6. @Injectable({
  7. providedIn: 'root'
  8. })
  9. export class AppDefineService {
  10. constructor(private http : HttpClient) { }
  11. public getAppParamsDefine(app: string | undefined | null) : Observable<Message<ParamDefine[]>> {
  12. if (app === null || app === undefined) {
  13. console.log("getAppParamsDefine app can not null");
  14. }
  15. const paramDefineUri = `/apps/${app}/params`;
  16. return this.http.get<Message<ParamDefine[]>>(paramDefineUri);
  17. }
  18. }