diff --git a/src/exit-code.ts b/src/exit-code.ts index 6c4e842..b106073 100644 --- a/src/exit-code.ts +++ b/src/exit-code.ts @@ -4,8 +4,8 @@ export enum ExitCode { NEED_SMS_AUTH = 2, CANNOT_SOLVE_PUZZLE = 3, OPERATION_TIMEOUT_EXCEEDED = 4, - NEED_EMAIL_AUTH = 5, LOGIN_DENIED = 6, + NEED_EMAIL_AUTH = 7, TOO_MUCH_TRY = 69, INVALID_OPTIONS = 77, WRONG_PASSWORD = 87, diff --git a/src/tw-shopee-bot.ts b/src/tw-shopee-bot.ts index 97b7131..053211f 100644 --- a/src/tw-shopee-bot.ts +++ b/src/tw-shopee-bot.ts @@ -383,9 +383,9 @@ export default class TaiwanShopeeBot { // Login failed. Try use email link to login. if (disableEmailLogin) { logger.error('Email authentication is required.') - } else { - result = await this.tryLoginWithEmailLink() + return result } + result = await this.tryLoginWithEmailLink() } if (result !== undefined) {