import { Injectable } from '@angular/core'; import { RPCService } from '@loafer/ng-rpc'; import { Observable } from 'rxjs'; import { MemberTotp } from '@overflow/commons-typescript/model/member'; import { Member } from '@overflow/commons-typescript/model/member'; @Injectable() export class MemberTotpService { public constructor( private rpcService: RPCService, ) { } public createTotp(member: Member): Observable { return this.rpcService.call('MemberTotpService.createTotp', member); } public regist(member: Member, secretCode: string, code: string): Observable { // const param = { // Member: {id: 1, }, // MemberTotp: {id: 1, secretCode: 'dkdkdkdk'}, // code: '123123' // }; return this.rpcService.call('MemberTotpService.regist', member, secretCode, code); } public checkCodeForMember(memberEmail: string, code: string): Observable { return this.rpcService.call('MemberTotpService.checkCodeForMember', memberEmail, code); } }