Skip to content
account.service.ts 567 B
Newer Older
wangqinghua's avatar
wangqinghua committed
import { Injectable } from '@angular/core';
import { HttpClient, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { SERVER_API_URL } from '../../app.constants';

@Injectable()
export class AccountService  {
    constructor(private http: HttpClient) { }

wangqinghua's avatar
wangqinghua committed
    get(): Observable<any>{
        return this.http.post(SERVER_API_URL + '/login', {observe : 'response'});
wangqinghua's avatar
wangqinghua committed
    }

    save(account: any): Observable<HttpResponse<any>> {
        return this.http.post(SERVER_API_URL + '', account, {observe: 'response'});
    }
}