blob: 7254126a53a78566efb5f6f0f2a2c2ade98dc7ca [file] [log] [blame]
pineafanc540da92021-09-03 20:33:36 +01001import Axios from 'axios';
2import qs from 'querystring';
3
pineafanaed30242021-09-04 09:33:40 +01004const verifyTkn = async (req, res) => {
pineafan98f42972021-09-04 10:01:56 +01005 console.log("I")
pineafanc540da92021-09-03 20:33:36 +01006 const chk = await Axios.post('https://hcaptcha.com/siteverify', qs.stringify({
7 response: req.body.tkn,
8 secret: '0x19C699BFfce07b2a026121DE6702706BB2d51D6c',
9 sitekey: '85074411-fa13-4d9b-b901-53095c6d1fc6'
10 }))
11
12 return res.send({ success: chk.data.success });
pineafanaed30242021-09-04 09:33:40 +010013}
14
15export default verifyTkn;