Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/mailchimp/connect-mailchimp.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const apikey = process.env.MAILCHIMP_API_KEY;

mailchimp.setConfig({
apiKey: apikey,
server: "us12",
server: 'us12',
});

async function connectMailchimp() {
Expand Down
6 changes: 3 additions & 3 deletions backend/mailchimp/contacts.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const apikey = process.env.MAILCHIMP_API_KEY;

mailchimp.setConfig({
apiKey: apikey,
server: "us12",
server: 'us12',
});

// Audience ID: 968cfc7373
Expand All @@ -19,7 +19,7 @@ const addContacts = async () => {
json: (data) => console.log(data)
})
});
console.log(data)
console.log(data);
for (const email of data) {
const response = await mailchimp.lists.addListMember('968cfc7373', {
email_address: email,
Expand All @@ -36,6 +36,6 @@ const addContacts = async () => {
const getContacts = async() => {
const response = await mailchimp.lists.getListMembersInfo('968cfc7373');
console.log(response);
}
};

export { addContacts, getContacts };