blob: e0c4de19340a261ec500c1cabab646db32c2dcf8 [file] [log] [blame]
import Axios from 'axios';
const Validate = async (req, res) => {
try {
var out = await Axios.get(`http://localhost:10000/verify/${req.body.code}`)
out = out.data
let props = {
user: out.user,
role: out.role,
role_name: out.role_name,
guild: out.guild,
guild_name: out.guild_name,
guild_icon_url: out.guild_icon_url,
guild_size: out.guild_size
}
return res.status(200).send(props)
} catch (err) {
return res.status(400).end()
}
}
export default Validate;