member_webapp/@overflow/member/service/email-auth.service.ts
crusader cd1e53f67a ing
2018-06-04 17:25:29 +09:00

31 lines
672 B
TypeScript

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<any> {
return this.restService.request<any>('post', '/account/confirm_email', {
body: {
token: token,
},
});
}
public readByPwAuthKey(token: string): Observable<any> {
return this.restService.request<any>('post', '/account/confirm_reset_pw', {
body: {
token: token,
},
});
}
}