diff --git a/src/services/common/MailchimpService/MailchimpService.ts b/src/services/common/MailchimpService/MailchimpService.ts index 9e0f4d09..367ca46b 100644 --- a/src/services/common/MailchimpService/MailchimpService.ts +++ b/src/services/common/MailchimpService/MailchimpService.ts @@ -114,4 +114,30 @@ export default class MailchimpService extends BaseService { }; }); } + + // private async addToMailchimpList(email: string) { + // const MAILCHIMP_API_KEY = "3fa54304bc766dfd0b8043a827b28a3a-us17" + // const data = { + // email_address: email, + // status: 'subscribed' + // }; + + // const response = await fetch(`https://us17.api.mailchimp.com/3.0/lists/6ea48f811d/members`, { + // method: 'POST', + // headers: { + // 'Authorization': `apikey ${MAILCHIMP_API_KEY}`, + // 'Content-Type': 'application/json' + // }, + // body: JSON.stringify(data) + // }); + + // const json = await response.json(); + + // if (response.status === 200) { + // res.json({ message: 'Successfully subscribed!' }); + // } else { + // res.json({ message: 'Failed to subscribe.' }); + // } + + // } }