remove filter on providers response

This commit is contained in:
Mark Kaylor 2022-06-03 16:57:47 +02:00
parent 265ee979e4
commit e7a4f7f7fa

View File

@ -3,15 +3,9 @@ import axios from 'axios';
const MARKETPLACE_API_URL = 'https://market-api.strapi.io';
const fetchMarketplacePlugins = async () => {
const { data: response } = await axios.get(`${MARKETPLACE_API_URL}/providers`);
const { data } = await axios.get(`${MARKETPLACE_API_URL}/providers`);
// Only keep v4 plugins
const filteredResponse = {
...response,
data: response.data.filter((provider) => provider.attributes.strapiCompatibility === 'v4'),
};
return filteredResponse;
return data;
};
export { fetchMarketplacePlugins };