testing in prod time
This commit is contained in:
parent
e218255441
commit
df6c1545af
1 changed files with 4 additions and 0 deletions
|
@ -6,6 +6,8 @@ const API_ENDPOINT = 'https://discord.com/api/v6';
|
|||
const axios = require('axios').default;
|
||||
|
||||
export function run(app) {
|
||||
const logger = app.get('logger');
|
||||
|
||||
app.get('/discordauth', async (req, res) => {
|
||||
const code = req.query.code;
|
||||
|
||||
|
@ -57,6 +59,8 @@ export function run(app) {
|
|||
res.send(`hi ${userInfo.data.username}#${userInfo.data.discriminator}<br><img src="https://media.discordapp.net/avatars/${userInfo.data.id}/${userInfo.data.avatar}.png"><br>ur useruuid is ${userUuid}`);
|
||||
} catch(err) {
|
||||
res.send(`whoooops<br>${err}`);
|
||||
console.error(err);
|
||||
logger.error(err);
|
||||
}
|
||||
} else {
|
||||
const url = `http://${req.headers.host}/discordauth`;
|
||||
|
|
Loading…
Reference in a new issue