Skip to content

Commit

Permalink
Update Strapi API call to populate storeButtons inside navigation (#264)
Browse files Browse the repository at this point in the history
Co-authored-by: Simone Salsi <[email protected]>
  • Loading branch information
simosalsi and Simone Salsi authored Apr 30, 2024
1 parent 9094255 commit 66c7bcf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/young-beers-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nextjs-website": patch
---

Update Strapi API call to populate storeButtons inside navigation
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe('getNavigation', () => {
expect(fetchMock).toHaveBeenCalledWith(
`${config.STRAPI_API_BASE_URL}/api/navigation/render/${
tenants[config.ENVIRONMENT].navigation
}?type=FLAT&populate[seo][populate][0]=metaTitle&populate[sections][populate][0]=ctaButtons&populate[sections][populate][1]=image&populate[sections][populate][2]=background&populate[sections][populate][3]=items.links&populate[sections][populate][4]=link&populate[sections][populate][5]=steps&populate[sections][populate][6]=accordionItems&populate[sections][populate][7]=decoration`,
}?type=FLAT&populate[seo][populate][0]=metaTitle&populate[sections][populate][0]=ctaButtons&populate[sections][populate][1]=image&populate[sections][populate][2]=background&populate[sections][populate][3]=items.links&populate[sections][populate][4]=link&populate[sections][populate][5]=steps&populate[sections][populate][6]=accordionItems&populate[sections][populate][7]=decoration&populate[sections][populate][8]=storeButtons`,
{
method: 'GET',
headers: {
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs-website/src/lib/fetch/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const getNavigation = ({
// All query parameters in the following URL indicate specific fields that would not otherwise be automatically returned by Strapi
`${config.STRAPI_API_BASE_URL}/api/navigation/render/${
tenants[config.ENVIRONMENT].navigation
}?type=FLAT&populate[seo][populate][0]=metaTitle&populate[sections][populate][0]=ctaButtons&populate[sections][populate][1]=image&populate[sections][populate][2]=background&populate[sections][populate][3]=items.links&populate[sections][populate][4]=link&populate[sections][populate][5]=steps&populate[sections][populate][6]=accordionItems&populate[sections][populate][7]=decoration`,
}?type=FLAT&populate[seo][populate][0]=metaTitle&populate[sections][populate][0]=ctaButtons&populate[sections][populate][1]=image&populate[sections][populate][2]=background&populate[sections][populate][3]=items.links&populate[sections][populate][4]=link&populate[sections][populate][5]=steps&populate[sections][populate][6]=accordionItems&populate[sections][populate][7]=decoration&populate[sections][populate][8]=storeButtons`,
{
method: 'GET',
headers: {
Expand Down

0 comments on commit 66c7bcf

Please sign in to comment.