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 { const body = { signinId: email, signinPw: password, }; return this.restService.request('post', '/account/signin', { body: body, }); } public signin_cookie(authToken: string): Observable { const body = { authToken: authToken, }; return this.restService.request('post', '/account/signin_cookie', { body: body, }); } public signup(member: Member): Observable { return this.restService.request('post', '/account/signup', { body: member, }); } }