blob: b44624e534b4e3c4794c7acaa83284c994deb494 [file] [log] [blame]
pineafanfd93e6e2022-05-06 20:30:09 +01001import Axios from 'axios';
2import qs from 'querystring';
3
4const verifyToken = async (req, res) => {
5 const chk = await Axios.post('https://hcaptcha.com/siteverify', qs.stringify({
6 response: req.body.tkn,
7 secret: '0x19C699BFfce07b2a026121DE6702706BB2d51D6c',
8 sitekey: '85074411-fa13-4d9b-b901-53095c6d1fc6'
9 }))
10
11 // return res.send({ success: false });
12 return res.send({ success: chk.data.success });
13}
14
15export default verifyToken;