import { Injectable } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/map'; import { RESTService } from '@loafer/ng-rest/service'; import { DomainMember } from 'packages/domain/model'; import { Member } from '../model'; @Injectable() export class MemberService { public constructor( private restService: RESTService, ) { } public signin(email: string, password: string): Observable { return this.restService.request('post', '/account/signin', { body: { signinID: email, signinPW: password, }, }); } public signin_cookie(authToken: string): Observable { return this.restService.request('post', '/account/signin_cookie', { body: { authToken: authToken, }, }); } public signup(member: Member): Observable { return this.restService.request('post', '/account/signup', { body: { member: member, }, }); } }