Skip to content

Commit

Permalink
add back keystatic to api config
Browse files Browse the repository at this point in the history
  • Loading branch information
4eyes52 committed Sep 7, 2024
1 parent 95a23a3 commit d07f293
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/nextjs/src/app/api/keystatic/[...params]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ import { makeRouteHandler } from "@keystatic/next/route-handler";
import config from "../../../../../keystatic.config";

export const { POST, GET } = makeRouteHandler({
clientId: process.env.KEYSTATIC_GITHUB_CLIENT_ID,
clientSecret: process.env.KEYSTATIC_GITHUB_CLIENT_SECRET,
secret: process.env.KEYSTATIC_SECRET,
config,
});
4 changes: 4 additions & 0 deletions apps/nextjs/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export const env = createEnv({
server: {
DATABASE_URL: z.string().url(),
INNGEST_EVENT_KEY: z.string().optional(),
KEYSTATIC_GITHUB_CLIENT_ID: z.string(),
KEYSTATIC_GITHUB_CLIENT_SECRET: z.string(),
KEYSTATIC_SECRET: z.string()
},

/**
Expand All @@ -41,6 +44,7 @@ export const env = createEnv({
NEXT_PUBLIC_ALCHEMY_API: z.string(),
NEXT_PUBLIC_ETHPLORER_APIKEY: z.string(),
// NEXT_PUBLIC_CLIENTVAR: z.string(),
//NEXT_PUBLIC_KEYSTATIC_GITHUB_APP_SLUG: z.string()
},
/**
* Destructure all variables from `process.env` to make sure they aren't tree-shaken away.
Expand Down

0 comments on commit d07f293

Please sign in to comment.