We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e35329 commit 0fe6eb3Copy full SHA for 0fe6eb3
packages/pliny/src/newsletter/beehiiv.ts
@@ -3,14 +3,13 @@ export const beehiivSubscribe = async (email: string) => {
3
const PUBLICATION_ID = process.env.BEEHIIV_PUBLICATION_ID
4
const API_URL = `https://api.beehiiv.com/v2/publications/${PUBLICATION_ID}/subscriptions`
5
6
-
7
const data = {
8
email,
9
reactivate_existing: false,
10
send_welcome_email: true,
11
}
12
13
- const response = await fetch(`${API_URL}/subscribers`, {
+ const response = await fetch(API_URL, {
14
method: 'POST',
15
headers: {
16
'Content-Type': 'application/json',
@@ -20,4 +19,4 @@ export const beehiivSubscribe = async (email: string) => {
20
19
})
21
22
return response
23
-}
+}
0 commit comments