Skip to content

Commit 0fe6eb3

Browse files
SahilSahil
Sahil
authored and
Sahil
committed
update URL in actual fetch
1 parent 2e35329 commit 0fe6eb3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: packages/pliny/src/newsletter/beehiiv.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ export const beehiivSubscribe = async (email: string) => {
33
const PUBLICATION_ID = process.env.BEEHIIV_PUBLICATION_ID
44
const API_URL = `https://api.beehiiv.com/v2/publications/${PUBLICATION_ID}/subscriptions`
55

6-
76
const data = {
87
email,
98
reactivate_existing: false,
109
send_welcome_email: true,
1110
}
1211

13-
const response = await fetch(`${API_URL}/subscribers`, {
12+
const response = await fetch(API_URL, {
1413
method: 'POST',
1514
headers: {
1615
'Content-Type': 'application/json',
@@ -20,4 +19,4 @@ export const beehiivSubscribe = async (email: string) => {
2019
})
2120

2221
return response
23-
}
22+
}

0 commit comments

Comments
 (0)