Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3663a98

Browse files
committed
fix typo
1 parent 57e39f8 commit 3663a98

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Great thanks to leetcode.com, a really awesome website!
4141
Read help first $ leetcode help
4242
Login with your leetcode account $ leetcode user -l
4343
Login with third party account--GitHub $ leetcode user -g
44-
Login with third party account--Linkedin $ leetcode user -i
44+
Login with third party account--LinkedIn $ leetcode user -i
4545
Cookie login with cookie $ leetcode user -c
4646
Browse all questions $ leetcode list
4747
Choose one question $ leetcode show 1 -g -l cpp

lib/commands/user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const cmd = {
3737
alias: 'linkedin',
3838
type: 'boolean',
3939
default: false,
40-
describe: 'linkinedLogin'
40+
describe: 'linkedinLogin'
4141
})
4242
.option('L', {
4343
alias: 'logout',
@@ -49,7 +49,7 @@ const cmd = {
4949
.example(chalk.yellow('leetcode user -l'), 'User login')
5050
.example(chalk.yellow('leetcode user -c'), 'User Cookie login')
5151
.example(chalk.yellow('leetcode user -g'), 'User GitHub login')
52-
.example(chalk.yellow('leetcode user -i'), 'User Linkedin login')
52+
.example(chalk.yellow('leetcode user -i'), 'User LinkedIn login')
5353
.example(chalk.yellow('leetcode user -L'), 'User logout');
5454
}
5555
};
@@ -87,7 +87,7 @@ cmd.handler = function(argv) {
8787
[
8888
['g', core.githubLogin],
8989
['github', core.githubLogin],
90-
['i', core.linkinedLogin],
90+
['i', core.linkedinLogin],
9191
['linkedin', core.linkedinLogin],
9292
]
9393
);

lib/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ const DEFAULT_CONFIG = {
3434
base: 'https://leetcode.com',
3535
graphql: 'https://leetcode.com/graphql',
3636
login: 'https://leetcode.com/accounts/login/',
37-
// third part login base urls. TODO facebook linkin google
37+
// third part login base urls. TODO facebook google
3838
github_login: 'https://leetcode.com/accounts/github/login/?next=%2F',
3939
facebook_login: 'https://leetcode.com/accounts/facebook/login/?next=%2F',
40-
linkined_login: 'https://leetcode.com/accounts/linkedin_oauth2/login/?next=%2F',
40+
linkedin_login: 'https://leetcode.com/accounts/linkedin_oauth2/login/?next=%2F',
4141
problems: 'https://leetcode.com/api/problems/$category/',
4242
problem: 'https://leetcode.com/problems/$slug/description/',
4343
test: 'https://leetcode.com/problems/$slug/interpret_solution/',

lib/plugins/leetcode.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ plugin.githubLogin = function(user, cb) {
597597
_request.get({url: leetcodeUrl}, function(e, resp, body) {
598598
const redirectUri = resp.request.uri.href;
599599
if (redirectUri !== 'https://leetcode.com/') {
600-
return cb('GitHub login failed or GitHub did not link to leetcode');
600+
return cb('GitHub login failed or GitHub did not link to LeetCode');
601601
}
602602
const cookieData = parseCookie(resp.request.headers.cookie, cb);
603603
saveAndGetUser(user, cb, cookieData);
@@ -606,8 +606,8 @@ plugin.githubLogin = function(user, cb) {
606606
});
607607
};
608608

609-
plugin.linkinedLogin = function(user, cb) {
610-
const leetcodeUrl = config.sys.urls.linkined_login;
609+
plugin.linkedinLogin = function(user, cb) {
610+
const leetcodeUrl = config.sys.urls.linkedin_login;
611611
const _request = request.defaults({
612612
jar: true,
613613
headers: {
@@ -616,11 +616,11 @@ plugin.linkinedLogin = function(user, cb) {
616616
});
617617
_request('https://www.linkedin.com', function(e, resp, body) {
618618
if ( resp.statusCode !== 200) {
619-
return cb('Get linkedin session failed');
619+
return cb('Get linkedIn session failed');
620620
}
621621
const authenticityToken = body.match(/input name="loginCsrfParam" value="(.*)" /);
622622
if (authenticityToken === null) {
623-
return cb('Get Linkedin token failed');
623+
return cb('Get LinkedIn token failed');
624624
}
625625
const options = {
626626
url: 'https://www.linkedin.com/uas/login-submit',
@@ -638,12 +638,12 @@ plugin.linkinedLogin = function(user, cb) {
638638
};
639639
_request(options, function(e, resp, body) {
640640
if (resp.statusCode !== 200) {
641-
return cb('Linkedin login failed');
641+
return cb('LinkedIn login failed');
642642
}
643643
_request.get({url: leetcodeUrl}, function(e, resp, body) {
644644
const redirectUri = resp.request.uri.href;
645645
if (redirectUri !== 'https://leetcode.com/') {
646-
return cb('Linkedin login failed or Linkedin did not link to leetcode');
646+
return cb('LinkedIn login failed or LinkedIn did not link to LeetCode');
647647
}
648648
const cookieData = parseCookie(resp.request.headers.cookie, cb);
649649
saveAndGetUser(user, cb, cookieData);

0 commit comments

Comments
 (0)