Skip to content

Commit

Permalink
fix: update environment variables (#1563)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrickheadJohnny authored Nov 25, 2024
1 parent 07ada4c commit cd0a8c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/config/pinata.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import { env } from "@/lib/env";
import { PinataSDK } from "pinata-web3";

export const pinata = new PinataSDK({
pinataJwt: `${env.PINATA_JWT}`,
pinataJwt: `${env.PINATA_ADMIN_JWT}`,
pinataGateway: `${env.NEXT_PUBLIC_PINATA_GATEWAY_URL}`,
});
8 changes: 4 additions & 4 deletions src/lib/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ import { z } from "zod";

export const env = createEnv({
server: {
PINATA_JWT: z.string(),
PINATA_ADMIN_JWT: z.string(),
},
client: {
NEXT_PUBLIC_API: z.string(),
NEXT_PUBLIC_URL: z.string(),
NEXT_PUBLIC_PINATA_GATEWAY_URL: z.string(),
},
runtimeEnv: {
NEXT_PUBLIC_API: process.env.NEXT_PUBLIC_API,
NEXT_PUBLIC_API: process.env.NEXT_PUBLIC_API_V3,
NEXT_PUBLIC_URL:
process.env.NODE_ENV === "production"
? process.env.NEXT_PUBLIC_URL
? process.env.NEXT_PUBLIC_VERCEL_URL
: "http://localhost",
PINATA_JWT: process.env.PINATA_JWT,
PINATA_ADMIN_JWT: process.env.PINATA_ADMIN_JWT,
NEXT_PUBLIC_PINATA_GATEWAY_URL: process.env.NEXT_PUBLIC_PINATA_GATEWAY_URL,
},
});

0 comments on commit cd0a8c2

Please sign in to comment.