From 199b343d5dd775f37f8881580509dda24a06bc0b Mon Sep 17 00:00:00 2001 From: Raphix Date: Tue, 22 Aug 2023 18:47:49 +0200 Subject: [PATCH] Versiion 0.2.3 - Ajout Handle Case Discriminator FINAL --- src/modules/sub-auth.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/modules/sub-auth.js b/src/modules/sub-auth.js index 993b46b..933eb0d 100644 --- a/src/modules/sub-auth.js +++ b/src/modules/sub-auth.js @@ -77,13 +77,16 @@ module.exports.getDiscordUser = function (code, session) { if(typeof userInfo.user.global_name == "undefined") { reject("MIGRATE_ACCOUNT_ONLY") + } else { + user.auth = authorizationKey + Object.assign(user, userInfo) + + + resolve(user) + } - user.auth = authorizationKey - Object.assign(user, userInfo) - - - resolve(user) + }).catch(error => reject(error))