We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 852b75a + e29e776 commit 6ba7966Copy full SHA for 6ba7966
.changeset/fifty-comics-approve.md
@@ -0,0 +1,5 @@
1
+---
2
+'pliny': patch
3
4
+
5
+change buttondown api params email to email_address
packages/pliny/src/newsletter/buttondown.ts
@@ -2,10 +2,11 @@ export const buttondownSubscribe = async (email: string) => {
const API_KEY = process.env.BUTTONDOWN_API_KEY
const API_URL = 'https://api.buttondown.email/v1/'
const buttondownRoute = `${API_URL}subscribers`
6
+ const data = { email_address: email }
7
8
const response = await fetch(buttondownRoute, {
- body: JSON.stringify({
- email,
- }),
9
+ body: JSON.stringify(data),
10
headers: {
11
Authorization: `Token ${API_KEY}`,
12
'Content-Type': 'application/json',
0 commit comments