nice commit
diff --git a/pages/api/nucleus/verify/complete.js b/pages/api/nucleus/verify/complete.js
index 62802ba..0183270 100644
--- a/pages/api/nucleus/verify/complete.js
+++ b/pages/api/nucleus/verify/complete.js
@@ -11,7 +11,7 @@
return res.status(200).send({success: false})
}
try {
- await Axios.post(`${process.env.NUCLEUS_CALLBACK}/verify/${req.body.code}`, {
+ await Axios.post(`http://${process.env.NUCLEUS_CALLBACK}/verify/${req.body.code}`, {
secret: process.env.VERIFY_SECRET
});
} catch (e) {
diff --git a/pages/api/rsmv/complete.js b/pages/api/rsmv/complete.js
deleted file mode 100644
index 8a0ce32..0000000
--- a/pages/api/rsmv/complete.js
+++ /dev/null
@@ -1,20 +0,0 @@
-import Axios from 'axios';
-
-const Complete = async (req, res) => {
- let code = await Axios.post('http://127.0.0.1:3000/api/rsmv/validate', {code:req.body.code});
- if (code.status !== 200) {
- return res.send(404);
- }
- if (code.data.user !== req.body.uid) return res.send(401)
- if (code.data.guild !== req.body.gid) return res.send(401)
- if (code.data.role !== req.body.rid) return res.send(401)
- console.log(req.body)
-
- let secret = process.env.VERIFY_SECRET;
- let resp = await Axios.get(
- `http://127.0.0.1:10000/verify/${req.body.gid}/${req.body.rid}/${req.body.uid}/${secret}/${req.body.code}`
- )
- return res.send(resp.status);
-}
-
-export default Complete;
\ No newline at end of file
diff --git a/pages/api/rsmv/validate.js b/pages/api/rsmv/validate.js
deleted file mode 100644
index d968d50..0000000
--- a/pages/api/rsmv/validate.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import Axios from 'axios';
-
-const Validate = async (req, res) => {
- try {
- var out = await Axios.get(`http://${process.env.NUCLEUS_CALLBACK}/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;
\ No newline at end of file
diff --git a/pages/api/rsmv/verifyTkn.js b/pages/api/rsmv/verifyTkn.js
deleted file mode 100644
index 50eb77e..0000000
--- a/pages/api/rsmv/verifyTkn.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import Axios from 'axios';
-import qs from 'querystring';
-
-const verifyTkn = async (req, res) => {
- const chk = await Axios.post('https://hcaptcha.com/siteverify', qs.stringify({
- response: req.body.tkn,
- secret: '0x19C699BFfce07b2a026121DE6702706BB2d51D6c',
- sitekey: '85074411-fa13-4d9b-b901-53095c6d1fc6'
- }))
-
- return res.send({ success: chk.data.success });
-}
-
-export default verifyTkn;
\ No newline at end of file