Skip to content

Commit

Permalink
feat: Improve edge config to include environment (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrgrundas authored and soniaklimas committed Feb 27, 2025
1 parent f808c1c commit 79aede0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/storefront/src/envs/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const schema = z.object({
.enum(["TEST", "LOCAL", "DEVELOPMENT", "PRODUCTION", "STAGING"])
.default("LOCAL"),

PAYMENT_APP_ID: z.string().default("DEVELOPMENT.nimara-ts-stripe"),
PAYMENT_APP_ID: z.string().default("DEVELOPMENT.stripe"),

NEXT_PUBLIC_BUTTER_CMS_API_KEY: z.string().optional(),

Expand Down
2 changes: 1 addition & 1 deletion apps/stripe/src/lib/saleor/webhooks/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const verifySaleorWebhookRoute =
} as ResponseSchema);
}

const event = (await request.json()) as WebhookData<T>;
const event = (await request.clone().json()) as WebhookData<T>;

return handler({ event, headers, request });
};
2 changes: 1 addition & 1 deletion apps/stripe/src/providers/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { SaleorEdgeConfigProvider } from "@/lib/saleor/config/edge";

export const getConfigProvider = ({ saleorDomain }: { saleorDomain: string }) =>
SaleorEdgeConfigProvider({
configKey: CONFIG.CONFIG_KEY,
configKey: `${CONFIG.ENVIRONMENT}-${CONFIG.CONFIG_KEY}`,
saleorDomain,
vercelTeamId: CONFIG.VERCEL_TEAM_ID,
vercelEdgeDatabaseId: CONFIG.VERCEL_EDGE_CONFIG_ID,
Expand Down

0 comments on commit 79aede0

Please sign in to comment.