@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.
package/dist/index.js
CHANGED
|
@@ -14406,12 +14406,11 @@ const CustomerPortal = ({ bearerToken, environment, }) => {
|
|
|
14406
14406
|
// Extract customerId from query parameters
|
|
14407
14407
|
const { searchParams } = new URL(req.url);
|
|
14408
14408
|
const customerId = searchParams.get("customer_id");
|
|
14409
|
-
const
|
|
14410
|
-
|
|
14411
|
-
|
|
14412
|
-
|
|
14413
|
-
|
|
14414
|
-
params.send_email = sendEmail;
|
|
14409
|
+
const sendEmailParam = searchParams.get("send_email");
|
|
14410
|
+
const params = {};
|
|
14411
|
+
if (sendEmailParam !== null) {
|
|
14412
|
+
// searchParams.get() already returns a single string or null
|
|
14413
|
+
params.send_email = sendEmailParam === "true";
|
|
14415
14414
|
}
|
|
14416
14415
|
if (!customerId) {
|
|
14417
14416
|
return new serverExports.NextResponse("Missing customerId in query parameters", {
|