Skip to content

Commit

Permalink
feat: turn on double opt in
Browse files Browse the repository at this point in the history
  • Loading branch information
theodorusclarence committed Jan 19, 2022
1 parent 9cd66de commit 65edae9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/components/content/blog/SubscribeCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export default function SubscribeCard({
axios
.post<{ message: string }>('/api/newsletter/add', {
email: data.email,
double_opt_in: false,
})
.then(() => {
reset();
Expand Down Expand Up @@ -114,7 +113,7 @@ export default function SubscribeCard({
)}
>
{status === 'success' ? (
'Thanks for subscribing. See you on the email!'
'Thanks, please confirm subscription on your email (check promotions or spam tab too)'
) : status === 'subscribed' ? (
'You have subscribed to the newsletter, stay tuned!'
) : status === 'error' ? (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/newsletter/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default async function handler(
try {
const response = await axios.post(
'https://www.getrevue.co/api/v2/subscribers',
data,
{ ...data, double_opt_in: true },
{
headers: {
'Content-Type': 'application/json',
Expand Down

1 comment on commit 65edae9

@vercel
Copy link

@vercel vercel bot commented on 65edae9 Jan 19, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.