codefordenver / partner-finder

Using an open dataset with registered colorado business to build a tool that manages outreach to potential CFD partners.
3 stars 14 forks source link

Return tags in the `/leads` endpoint #199

Closed galbwe closed 3 years ago

galbwe commented 3 years ago

At the moment, we are sending a request to get tags for each lead. This can take about 10s when there are 100 leads to render.

Screen Shot 2021-10-17 at 10 52 38 AM

we can probably cut down overhead from sending network requests by returning tags in the leads response. Something like

  "leads": [
    {
      "tags": [
           {
                 "id": 1,
                 "tag": "Animals",
           },
           ...
      ],
      "assigned": null,
      "colorado_region": null,
      "company_address": "16965 Pine Lane #120, Parker, CO, 80134",
      "company_name": "Advocates for Children CASA",
      ...
    },

Update the GET /leads endpoint so the response body includes a tags array similar to the above.

kaleeaswari commented 3 years ago

@galbwe Can I get it assigned?

galbwe commented 3 years ago

closed via https://github.com/codefordenver/partner-finder/pull/207