blob: e0c4de19340a261ec500c1cabab646db32c2dcf8 [file] [log] [blame]
pineafanff3d4522022-05-06 19:51:02 +01001import Axios from 'axios';
pineafanc540da92021-09-03 20:33:36 +01002
pineafanff3d4522022-05-06 19:51:02 +01003const Validate = async (req, res) => {
4 try {
pineafan6b282d12022-05-06 21:13:43 +01005 var out = await Axios.get(`http://localhost:10000/verify/${req.body.code}`)
pineafanff3d4522022-05-06 19:51:02 +01006 out = out.data
7 let props = {
8 user: out.user,
9 role: out.role,
10 role_name: out.role_name,
11 guild: out.guild,
12 guild_name: out.guild_name,
13 guild_icon_url: out.guild_icon_url,
14 guild_size: out.guild_size
15 }
16 return res.status(200).send(props)
17 } catch (err) {
18 return res.status(400).end()
19 }
pineafanaed30242021-09-04 09:33:40 +010020}
21
22export default Validate;