Open philvarner opened 3 years ago
If the sites are cached, the endpoint returns an error.
https://github.com/NASA-IMPACT/dashboard-api-starter/blob/3678af9324e6e1cd15be4fd6183ed4e24fc24b99/dashboard_api/api/api_v1/endpoints/sites.py#L26
if cache_client: sites = cache_client.get_dataset_from_cache(sites_hash) if sites: response.headers["X-Cache"] = "HIT"
should be:
if cache_client: sites_raw = cache_client.get_dataset_from_cache(sites_hash) sites = Sites.parse_raw(sites_raw) if sites: response.headers["X-Cache"] = "HIT"
If the sites are cached, the endpoint returns an error.
https://github.com/NASA-IMPACT/dashboard-api-starter/blob/3678af9324e6e1cd15be4fd6183ed4e24fc24b99/dashboard_api/api/api_v1/endpoints/sites.py#L26
should be: