import { NewsResponse } from './api/news.response.model';

export interface News {
  title: string;
  body: string;
}

export function mapNewsResponseToNews(data: NewsResponse): News {
  const { body, title } = data;

  return {
    title: title,
    body: body.view.value
  }
}
