Skip to content

Commit

Permalink
Merge pull request #7 from ghostdevv/json
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostdevv authored Dec 12, 2022
2 parents 435f71a + f2235bb commit 91eef4b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ async function validateToken(token: string, secret: string) {
{
method: 'POST',
headers: {
'content-type': 'application/x-www-form-urlencoded',
'content-type': 'application/json',
},
body: new URLSearchParams({
body: JSON.stringify({
response: token,
secret: secret,
});
}),
},
);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "svelte-turnstile",
"version": "0.3.0",
"version": "0.3.1",
"scripts": {
"dev": "vite dev",
"package": "svelte-kit sync && svelte-package",
Expand Down
4 changes: 2 additions & 2 deletions src/routes/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ async function validateToken(token: string, secret: string) {
{
method: 'POST',
headers: {
'content-type': 'application/x-www-form-urlencoded',
'content-type': 'application/json',
},
body: new URLSearchParams({
body: JSON.stringify({
response: token,
secret: secret,
}),
Expand Down

0 comments on commit 91eef4b

Please sign in to comment.