{"size": 434, "ext": "js", "max_stars_repo_path": "src/services/airtable.service.js", "max_stars_repo_name": "twowheelstogo/api-plugin-third-services-lulis", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/services/airtable.service.js", "max_issues_repo_name": "twowheelstogo/api-plugin-third-services-lulis", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/services/airtable.service.js", "max_forks_repo_name": "twowheelstogo/api-plugin-third-services-lulis", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.5294117647, "max_line_length": 51, "alphanum_fraction": 0.6451612903}
import fetch from "node-fetch";

export default async (body) => {
  const deliveryUrl = process.env.DELIVERY_URL;
  const url = `${deliveryUrl}/api/v1/airtable`;
  const res = await fetch(url, {
    method: "POST",
    body: JSON.stringify(body),
    headers: { "Content-Type": "application/json" }
  });
  if (!res.ok) {
    throw new Error("Error en la comunicación");
  }
  const data = await res.json();
  return data.message;
};
