Skip to content

Commit

Permalink
Merge pull request #490 from Plant-for-the-Planet-org/feature/x-local…
Browse files Browse the repository at this point in the history
…e-req-header

Add X-Locale header to donation POST requests
  • Loading branch information
mariahosfeld authored Feb 24, 2025
2 parents 183cfec + 288a3cc commit a97947e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Donations/Components/DonationsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,9 @@ function DonationsForm(): ReactElement {
addIdempotencyKeyHeader: true,
tenant,
locale: i18n.language,
headers: {
"X-Locale": i18n.language,
},
});

if (status === 200) {
Expand Down
3 changes: 3 additions & 0 deletions src/Donations/PaymentMethods/PaymentFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ export async function createDonationFunction({
tenant,
locale,
token: token ? token : null,
headers: {
"X-Locale": locale,
},
};
const donation = await apiRequest(requestParams);
if (donation && donation.data) {
Expand Down

0 comments on commit a97947e

Please sign in to comment.