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

import { Post } from '../../core/entities';

@Injectable()
export class MyPostsService {

	constructor(private http: HttpClient) {}

	getMyPosts(): Observable<Array<Post>> {
		return this.http.get<Array<Post>>(`/api/posts/myPosts`);
	}
}
