Skip to content

Commit

Permalink
Subscribe new member to newsletter (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
Janaka-Steph committed Mar 20, 2024
1 parent 2513ff7 commit 08f699c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/api/add-member.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default async function handler(req, res) {

const url = `${BLOG_URL}/ghost/api/admin/members/`;
const headers = { Authorization: `Ghost ${token}` };
const payload = { members: [{ email }] };
const payload = {members: [{email, newsletters: [{id: "6575d0912c87960008d86bbd"}]}]};

try {
const response = await axios.post(url, payload, { headers });
Expand Down

0 comments on commit 08f699c

Please sign in to comment.