File

src/app/modules/public/module/offline/services/offline-report-issues/offline-report-issues.service.ts

Index

Properties
Methods

Constructor

constructor(publicDataService: PublicDataService, configService: ConfigService)
Parameters :
Name Type Optional
publicDataService PublicDataService No
configService ConfigService No

Methods

reportOtherIssue
reportOtherIssue(apiBody)
Parameters :
Name Optional
apiBody No

Properties

Public configService
Type : ConfigService
Public publicDataService
Type : PublicDataService
import { Injectable } from '@angular/core';
import { PublicDataService } from '@sunbird/core';
import { map, catchError } from 'rxjs/operators';
import { throwError as observableThrowError, Observable } from 'rxjs';

import { ConfigService, ServerResponse } from '@sunbird/shared';


@Injectable({
  providedIn: 'root'
})
export class OfflineReportIssuesService {

  constructor(public publicDataService: PublicDataService, public configService: ConfigService) { }

  reportOtherIssue(apiBody): Observable<ServerResponse> {
    const requestParams = {
      url: this.configService.urlConFig.URLS.OFFLINE.REPORT_OTHER_ISSUE,
      data: apiBody
    };
    return this.publicDataService.post(requestParams).pipe(map((response: ServerResponse) => {
      return response;
    }), catchError(err => {
      return observableThrowError(err);
    }));
  }
}

results matching ""

    No results matching ""