File

src/app/modules/core/services/otp/otp.service.ts

Index

Properties
Methods

Constructor

constructor(learnerService: LearnerService, configService: ConfigService)
Parameters :
Name Type Optional
learnerService LearnerService No
configService ConfigService No

Methods

generateOTP
generateOTP(data)
Parameters :
Name Optional
data No
Returns : any
verifyOTP
verifyOTP(data)
Parameters :
Name Optional
data No
Returns : any

Properties

Public configService
Type : ConfigService
import { Injectable } from '@angular/core';
import { LearnerService } from './../learner/learner.service';
import { ConfigService } from '@sunbird/shared';

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

  constructor(private learnerService: LearnerService, public configService: ConfigService) { }

  generateOTP(data) {
    const options = {
      url: this.configService.urlConFig.URLS.OTP.GENERATE,
      data: data
    };
    return this.learnerService.post(options);
  }

  verifyOTP(data) {
    const options = {
      url: this.configService.urlConFig.URLS.OTP.VERIFY,
      data: data
    };
    return this.learnerService.post(options);
  }
}

results matching ""

    No results matching ""