src/app/modules/core/services/certificate/certificate.service.ts
Properties |
|
Methods |
constructor(learnerService: LearnerService, configService: ConfigService)
|
|||||||||
Parameters :
|
fetchCertificatePreferences | ||||
fetchCertificatePreferences(data)
|
||||
Parameters :
Returns :
Observable<ServerResponse>
|
getBatchDetails | ||||
getBatchDetails(bathId)
|
||||
Parameters :
Returns :
any
|
validateCertificate | ||||
validateCertificate(data)
|
||||
Parameters :
Returns :
Observable<ServerResponse>
|
Public configService |
Type : ConfigService
|
Public learnerService |
Type : LearnerService
|
import { LearnerService } from './../learner/learner.service';
import { Injectable } from '@angular/core';
import { ConfigService, ServerResponse } from '@sunbird/shared';
import { Observable } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class CertificateService {
constructor(public learnerService: LearnerService, public configService: ConfigService) { }
validateCertificate(data): Observable<ServerResponse> {
const option = {
url: this.configService.urlConFig.URLS.USER.VALIDATE_CERTIFICATE,
data: data
};
return this.learnerService.post(option);
}
fetchCertificatePreferences(data): Observable<ServerResponse> {
const option = {
url: this.configService.urlConFig.URLS.TENANT_PREFERENCE.READ,
data: data
};
return this.learnerService.post(option);
}
getBatchDetails(bathId) {
const option = {
url: `${this.configService.urlConFig.URLS.BATCH.GET_DETAILS}/${bathId}`
};
return this.learnerService.get(option);
}
}