import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import 'rxjs/add/operator/map'; import { RESTService } from '@loafer/ng-rest'; @Injectable() export class EmailAuthService { public constructor( private restService: RESTService, ) {} public readBySignupAuthKey(token: string): Observable { return this.restService.request('post', '/account/confirm_email', { body: { token: token, }, }); } public readByPwAuthKey(token: string): Observable { return this.restService.request('post', '/account/confirm_reset_pw', { body: { token: token, }, }); } }