Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix leetcode-cn urls #19

Merged
merged 2 commits into from
Aug 18, 2018
Merged

Fix leetcode-cn urls #19

merged 2 commits into from
Aug 18, 2018

Conversation

zouyonghao
Copy link
Contributor

It seems the leetcode-cn plugin need one more url replaced for working well.
That is config.sys.urls.problem_detail

It seems the leetcode-cn plugin need one more url replaced for working well.
That is config.sys.urls.problem_detail
Fix url for leetcode-cn
@jdneo
Copy link

jdneo commented Aug 14, 2018

I also have some problems when submitting answers to leetcode-cn. @zouyonghao May I ask what is this change fixing for?

@zouyonghao
Copy link
Contributor Author

@jdneo If you install the leetcode.cn plugin, it works fine when you try login and list problems. But when you try to show the problem detail, it still use the leetcode.com, so I just add a replacement for the problem detail url.
ps. use leetcode show 1 -vv to see the process

@jdneo
Copy link

jdneo commented Aug 15, 2018

@zouyonghao Yes after adding this line everything works fine now.

Maybe a stupid question from me: I didn't find any place referencing the sys.urls.problem_detail. Just curious how this magic happen. 😄

@zouyonghao
Copy link
Contributor Author

@jdneo I'm glad it works lol. Actually as a Java/C++ programmer or to say a fool in JS, I also see it as a magic. But I guess the url works in leetcode.js plugin and the getProblem method.
The recent code is using graphql url, but in the release, it still use problem_detail, maybe it's better to update the release.
see this commit

@jdneo
Copy link

jdneo commented Aug 16, 2018

@zouyonghao ok I see.

@skygragon Is there any plan to publish the new version of cli?

@skygragon skygragon merged commit c4ac577 into skygragon:master Aug 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants