WIP
This commit is contained in:
parent
19bb3eb1e8
commit
c01f5c1d25
@ -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.' });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user