Skip to content

Commit 08f699c

Browse files
authored
Subscribe new member to newsletter (#148)
1 parent 2513ff7 commit 08f699c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/api/add-member.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default async function handler(req, res) {
4747

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

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

0 commit comments

Comments
 (0)