mirror of
https://github.com/System-End/site.git
synced 2026-04-19 19:45:07 +00:00
nvm
This commit is contained in:
parent
60dd0813e3
commit
3417a33954
1 changed files with 10 additions and 2 deletions
|
|
@ -75,12 +75,20 @@ export default async (req, res) => {
|
|||
}
|
||||
]
|
||||
}
|
||||
axios.post('https://slack.com/api/chat.postMessage', JSON.stringify(postData), {
|
||||
await fetch('https://slack.com/api/chat.postMessage', {
|
||||
method: 'post',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': `Bearer ${process.env.SLACK_BOT_TOKEN}`
|
||||
},
|
||||
}).then(r => console.log(r)).catch(err => console.error(err))
|
||||
body: JSON.stringify(postData)
|
||||
}).catch(err => console.error(err))
|
||||
/*axios.post('https://slack.com/api/chat.postMessage', JSON.stringify(postData), {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': `Bearer ${process.env.SLACK_BOT_TOKEN}`
|
||||
},
|
||||
}).then(r => console.log(r)).catch(err => console.error(err))*/
|
||||
}
|
||||
}
|
||||
res.json({ status: 'success' })
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue