import { EventEmitter, Injectable } from '@angular/core';

import { HttpClient } from '@angular/common/http';
import { catchError } from 'rxjs/internal/operators/catchError';

const serviceURL = './service/settings/goal-for-actions';

@Injectable({
  providedIn: 'root'
})

export class GoalForActionService {
  
  
  constructor(private http: HttpClient) { }


  getConfiguration(id){
    return this.http.get<any>(serviceURL+ '/' + id);
  }

  getAll(){
    return this.http.get<any>(serviceURL+ '/all');
  }

  update(body:any){
    return this.http.post<any>(serviceURL,body)
  }

  
  
}