One more time

This commit is contained in:
2022-12-25 14:43:57 +01:00
parent 694ea9f5de
commit 1e631f047d
2 changed files with 3 additions and 4 deletions

View File

@@ -43,10 +43,8 @@
method: 'POST', method: 'POST',
body: JSON.stringify({ email }) body: JSON.stringify({ email })
}) })
const result: FormStatus = await req.json() const result: FormStatus = await req.text()
formStatus = result formStatus = result
console.log(await req.text())
console.log(await req.json())
// If successful // If successful
if (formStatus.success) { if (formStatus.success) {

View File

@@ -25,8 +25,9 @@ export const POST = (async ({ request }) => {
email_address: email, email_address: email,
}) })
}) })
const res = await req.json() const res = await req.text()
console.log('server:', res) console.log('server:', res)
return new Response(res)
// Other error // Other error
if (res && res.status !== 'PENDING') { if (res && res.status !== 'PENDING') {