finish rudimentary auth flow

This commit is contained in:
41666 2017-12-10 05:26:56 -06:00
parent 90f302c103
commit cfc623b228
10 changed files with 101 additions and 15 deletions

View file

@ -92,6 +92,10 @@ class DiscordService extends Service {
async getUser (authToken) {
const url = 'https://discordapp.com/api/v6/users/@me'
try {
if (authToken == null || authToken === '') {
throw new Error('not logged in')
}
const rsp =
await superagent
.get(url)