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

@Injectable()
export class HeaderService {

	constructor(
		private http: HttpClient
	) {}

	getAllCategories(): Observable<Array<Category>> {
		return this.http.get<Array<Category>>('/api/categories/');
	}
}
