break join form

This commit is contained in:
Matthew Stanciu 2020-12-23 17:04:46 -05:00 committed by GitHub
parent 6ad538df5e
commit 216a10aa9d

View file

@ -43,20 +43,20 @@ export default async (req, res) => {
}
}
await joinTable.create({
/*await joinTable.create({
'Full Name': data.name,
'Email Address': data.email,
Student: data.teen,
Reason: data.reason,
Invited: true
})
})*/
// This is a private api method found in https://github.com/ErikKalkoken/slackApiDoc/blob/master/users.admin.invite.md
// I only got a successful response by putting all the args in URL params
// Giving JSON body DID NOT WORK when testing locally
// —@MaxWofford
const params = [
/*const params = [
`email=${data.email}`,
`token=${process.env.SLACK_LEGACY_TOKEN}`,
`real_name=${data.name}`,
@ -67,7 +67,7 @@ export default async (req, res) => {
const url = `https://slack.com/api/users.admin.invite?${params}`
await fetch(url, { method: 'POST' })
.then(r => r.json())
.then(r => console.log('Slack response', r))
.then(r => console.log('Slack response', r))*/
res.json({ status: 'success', message: 'Youve been invited to Slack!' })
}