Re-add api route

wooooooo
This commit is contained in:
Matthew Stanciu 2020-04-24 11:21:06 -04:00
parent 03b216e3fa
commit 6a4b40812b
2 changed files with 1 additions and 4 deletions

View file

@ -50,7 +50,7 @@ const JoinForm = () => {
body: JSON.stringify({ name, email, teen, reason })
})
.then((r) => r.json())
.then((r) => { console.log(r); setStatus(r.status) })
.then((r) => setStatus(r.status))
.catch((e) => console.error(e))
}}
>

View file

@ -8,10 +8,7 @@ const joinTable = new AirtablePlus({
export default async (req, res) => {
if (req.method === 'POST') {
console.log('hi')
const data = JSON.parse(req.body)
console.log(data)
console.log(data.name)
await joinTable.create({
'Full Name': data.name,
'Email Address': data.email,