diff --git a/lib/plugins/leetcode.js b/lib/plugins/leetcode.js index c403582d..cba6c87a 100644 --- a/lib/plugins/leetcode.js +++ b/lib/plugins/leetcode.js @@ -408,7 +408,9 @@ plugin.getUserInfo = function(cb) { '{', ' user {', ' username', - ' isCurrentUserPremium', + ' }', + ' userStatus {', + ' isPremium', ' }', '}' ].join('\n'), @@ -422,7 +424,8 @@ plugin.getUserInfo = function(cb) { if (e) return cb(e); const user = body.data.user; - return cb(null, user); + const userStatus = body.data.userStatus; + return cb(null, user, userStatus); }); }; @@ -514,9 +517,9 @@ plugin.getUser = function(user, cb) { log.warn('Failed to retrieve user favorites: ' + e); } - plugin.getUserInfo(function(e, _user) { + plugin.getUserInfo(function(e, _user, _userStatus) { if (!e) { - user.paid = _user.isCurrentUserPremium; + user.paid = _userStatus.isPremium user.name = _user.username; } session.saveUser(user); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy