import { Injectable } from '@angular/core';
import { User } from '../core/entities';
import { Observable } from 'rxjs';
import { HttpClient } from '@angular/common/http';

@Injectable()
export class LoginService {

	constructor(
		private http: HttpClient
	) {}

	public login(user: User): Observable<User> {
		return this.http.post<User>('/api/account/login', user);
	}
}
