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

@Injectable({
  providedIn: 'root'
})
export class ApplicationService {

  constructor(
    private _httpClient: HttpClient
  ) {}

  add(application: Application): Promise<Application> {
    return this._httpClient.post<Application>('/api/applications', application).toPromise();
  }
}
