mirror of
https://github.com/System-End/site.git
synced 2026-04-19 05:50:31 +00:00
break join form
This commit is contained in:
parent
6ad538df5e
commit
216a10aa9d
1 changed files with 4 additions and 4 deletions
|
|
@ -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: 'You’ve been invited to Slack!' })
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue