Skip to content

Feature/webinar landing (#552) - #553

Merged
maxtechera merged 1 commit into
productionfrom
staging
Sep 24, 2025
Merged

Feature/webinar landing (#552)#553
maxtechera merged 1 commit into
productionfrom
staging

Conversation

@maxtechera

Copy link
Copy Markdown
Collaborator

No description provided.

@vercel

vercel Bot commented Sep 24, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
answerai-docs Building Building Preview Sep 24, 2025 9:40pm
the-answerai Ready Ready Preview Sep 24, 2025 9:40pm

@maxtechera
maxtechera merged commit 0f6408d into production Sep 24, 2025
7 of 9 checks passed
@maxtechera
maxtechera temporarily deployed to staging - aai-unified2-flowise-moonstruck September 24, 2025 21:41 — with Render Inactive

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +75 to +83
if (!response.ok) {
// Check if subscriber already exists (200/201 are success, 400 might be duplicate)
if (response.status === 400 && data.message?.includes('already exists')) {
// Try to update existing subscriber
const updateResponse = await fetch(`https://api.mailerlite.com/api/v2/subscribers/${body.email}`, {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
'X-MailerLite-ApiKey': MAILERLITE_API_KEY

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] URL-encode email before calling MailerLite update endpoint

When handling a duplicate subscriber, the code constructs the update URL with https://api.mailerlite.com/api/v2/subscribers/${body.email}. If the email contains characters that are not legal in a path segment (e.g. +, spaces, non‑ASCII), the request will be interpreted incorrectly by the MailerLite API and the update attempt will fail. This means users who sign up with common aliasing patterns like user+promo@example.com will never get the graceful "already subscribed" path and will continue receiving an error. Wrap the email with encodeURIComponent before interpolating it into the URL.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant