diff --git a/src/services/miiverse-api/routes/discovery.js b/src/services/miiverse-api/routes/discovery.js index af5d2ab..b21ad96 100644 --- a/src/services/miiverse-api/routes/discovery.js +++ b/src/services/miiverse-api/routes/discovery.js @@ -34,7 +34,7 @@ router.get('/', function (req, res) { } catch (e) { - //console.error(e); + console.error(e); } const discovery = await database.getDiscoveryHosts(); switch(discovery.has_error) diff --git a/src/util/authentication.js b/src/util/authentication.js index 208f48d..fe40197 100644 --- a/src/util/authentication.js +++ b/src/util/authentication.js @@ -62,9 +62,16 @@ let methods = { return out; }, processServiceToken: function(token) { - let B64token = Buffer.from(token, 'base64'); - let decryptedToken = this.decryptToken(B64token); - return decryptedToken.readUInt32LE(0x2); + try + { + let B64token = Buffer.from(token, 'base64'); + let decryptedToken = this.decryptToken(B64token); + return decryptedToken.readUInt32LE(0x2); + } + catch(e) + { + console.log(e); + } },