Skip to content

Commit

Permalink
fix: change storyblok loader param name to acessToken
Browse files Browse the repository at this point in the history
  • Loading branch information
dipankarmaikap committed Sep 18, 2024
1 parent 1a9bfb1 commit a3ba672
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/content-layer/storyblokLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import type { Loader } from "astro/loaders";
import { storyblokInit, apiPlugin } from "@storyblok/js";

interface StoryblokLoaderConfig {
STORYBLOK_TOKEN: string;
accessToken: string;
version: "draft" | "published";
}

export function storyblokLoader(config: StoryblokLoaderConfig): Loader {
const { storyblokApi } = storyblokInit({
accessToken: config.STORYBLOK_TOKEN,
accessToken: config.accessToken,
use: [apiPlugin],
});
return {
Expand Down
2 changes: 1 addition & 1 deletion playground-content-layer/src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defineCollection } from "astro:content";

const storyblokCollection = defineCollection({
loader: storyblokLoader({
STORYBLOK_TOKEN: "OsvNv534kS2nivAAj1EPVgtt",
accessToken: "OsvNv534kS2nivAAj1EPVgtt",
version: "published",
}),
});
Expand Down

0 comments on commit a3ba672

Please sign in to comment.