@dodopayments/nextjs 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"customer-portal.d.ts","sourceRoot":"","sources":["../../src/customer-portal/customer-portal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,OAAqB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE3D,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,aAAa,EACb,aAAa,GAAG,aAAa,CAC9B,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,+BAG5B,oBAAoB,WACU,WAAW,mCAwC3C,CAAC"}
1
+ {"version":3,"file":"customer-portal.d.ts","sourceRoot":"","sources":["../../src/customer-portal/customer-portal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,OAAqB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE3D,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,aAAa,EACb,aAAa,GAAG,aAAa,CAC9B,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,+BAG5B,oBAAoB,WACU,WAAW,mCAuC3C,CAAC"}
package/dist/index.cjs CHANGED
@@ -14408,12 +14408,11 @@ const CustomerPortal = ({ bearerToken, environment, }) => {
14408
14408
  // Extract customerId from query parameters
14409
14409
  const { searchParams } = new URL(req.url);
14410
14410
  const customerId = searchParams.get("customer_id");
14411
- const params = {
14412
- send_email: false,
14413
- };
14414
- const sendEmail = Boolean(searchParams.get("send_email"));
14415
- if (sendEmail) {
14416
- params.send_email = sendEmail;
14411
+ const sendEmailParam = searchParams.get("send_email");
14412
+ const params = {};
14413
+ if (sendEmailParam !== null) {
14414
+ // searchParams.get() already returns a single string or null
14415
+ params.send_email = sendEmailParam === "true";
14417
14416
  }
14418
14417
  if (!customerId) {
14419
14418
  return new serverExports.NextResponse("Missing customerId in query parameters", {