diff --git a/src/api/routes/Root.ts b/src/api/routes/Root.ts index d12be02..be1185f 100644 --- a/src/api/routes/Root.ts +++ b/src/api/routes/Root.ts @@ -58,7 +58,7 @@ export default class Root extends Route { res.setHeader('Access-Control-Allow-Origin', '*'); const token = jwt.verify(req.query.t.toString(), this.server.client.config.keyPair.privateKey); const check = await this.server.storage.get(token); - if (!check) return res.sendStatus(401); + if (check) return res.sendStatus(401); const embed = new RichEmbed(); embed.setTitle('Referral Authorization'); embed.addField('Referred User', token.referredUserAndDiscrim, true);