fix
parent
8c12ad4086
commit
91d7c1d8cf
|
@ -58,7 +58,7 @@ export default class Root extends Route {
|
||||||
res.setHeader('Access-Control-Allow-Origin', '*');
|
res.setHeader('Access-Control-Allow-Origin', '*');
|
||||||
const token = <any> jwt.verify(req.query.t.toString(), this.server.client.config.keyPair.privateKey);
|
const token = <any> jwt.verify(req.query.t.toString(), this.server.client.config.keyPair.privateKey);
|
||||||
const check = await this.server.storage.get<boolean>(token);
|
const check = await this.server.storage.get<boolean>(token);
|
||||||
if (!check) return res.sendStatus(401);
|
if (check) return res.sendStatus(401);
|
||||||
const embed = new RichEmbed();
|
const embed = new RichEmbed();
|
||||||
embed.setTitle('Referral Authorization');
|
embed.setTitle('Referral Authorization');
|
||||||
embed.addField('Referred User', token.referredUserAndDiscrim, true);
|
embed.addField('Referred User', token.referredUserAndDiscrim, true);
|
||||||
|
|
Loading…
Reference in New Issue