bug
diff --git a/pages/api/rsmv/validate.js b/pages/api/rsmv/validate.js
index 0133405..ae42c55 100644
--- a/pages/api/rsmv/validate.js
+++ b/pages/api/rsmv/validate.js
@@ -6,13 +6,14 @@
const collection = 'rsmv-tokens'
const Validate = (req, res) => {
+ console.log("A")
return new Promise((resolve, reject) => {
MongoClient.connect(url, async function(err, client) {
let db_response = await client.db(db).collection(collection).findOne({code: req.body.code});
-
+
if (!db_response) return resolve(res.status(404).end());
if (db_response.timestamp + (1800) >= Date.now()) return resolve(res.status(410));
-
+
let props = {
user: db_response.user,
role: db_response.role,
@@ -22,6 +23,7 @@
guild_icon_url: db_response.guild_icon_url,
guild_size: db_response.guild_size
}
+ console.log("B")
return resolve(res.status(200).send(props));
})
})