Skip to content

Commit

Permalink
HOTFIX: API Throttling. (#355)
Browse files Browse the repository at this point in the history
* HOTFIX: API Throttling.
  • Loading branch information
sherakama authored Oct 10, 2024
1 parent 62c2dbf commit fd0e1b7
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion app/(storyblok)/[[...slug]]/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ async function getStoryData(slug = 'momentum/page-not-found') {
const storyblokApi: StoryblokClient = getStoryblokApi();
const sbParams: ISbStoriesParams = {
version: isProd ? 'published' : 'draft',
cv: Date.now(),
resolve_relations: resolveRelations,
};

Expand Down
1 change: 0 additions & 1 deletion app/(storyblok)/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export async function generateStaticParams() {
const storyblokApi: StoryblokClient = getStoryblokApi();
let sbParams: ISbStoriesParams = {
version: isProd ? 'published' : 'draft',
cv: Date.now(),
resolve_links: '0',
resolve_assets: 0,
per_page: 100,
Expand Down
1 change: 0 additions & 1 deletion app/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ async function getStoryData(slug = 'momentum/page-not-found') {
const storyblokApi: StoryblokClient = getStoryblokApi();
const sbParams: ISbStoriesParams = {
version: isProd ? 'published' : 'draft',
cv: Date.now(),
resolve_relations: resolveRelations,
};

Expand Down
1 change: 0 additions & 1 deletion app/sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
// Fetch new content from storyblok.
let sbParams: ISbStoriesParams = {
version: isProd ? 'published' : 'draft',
cv: Date.now(),
resolve_links: '0',
resolve_assets: 0,
per_page: 100,
Expand Down
2 changes: 1 addition & 1 deletion utilities/data/getStoryData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async function getStoryData({ path, isEditor = false }: getStoryDataProps): Prom

let sbParams: ISbStoriesParams = {
version: isProd && !isEditor ? 'published' : 'draft',
cv: Date.now(),
cv: isEditor ? Date.now() : undefined,
resolve_relations: resolveRelations,
};

Expand Down
1 change: 0 additions & 1 deletion utilities/data/getStoryList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ async function getStoryList({ path }: getStoryDataProps) {
// For more related documentation see app/(storyblok)/[[...slug]]/page.tsx
const sbParams: ISbStoriesParams = {
version: isProd ? 'published' : 'draft',
cv: Date.now(),
starts_with: `${getSlugPrefix()}/stories/`,
sort_by: 'first_published_at:desc',
per_page: 100,
Expand Down

0 comments on commit fd0e1b7

Please sign in to comment.