File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ extern crate reqwest;
33
44use std:: fmt:: { Display , Formatter , Error } ;
55
6- const PROBLEMS_URL : & str = "https://leetcode.com/api/problems/algorithms/" ;
7- const GRAPHQL_URL : & str = "https://leetcode.com/graphql" ;
6+ const PROBLEMS_URL : & str = "https://leetcode-cn .com/api/problems/algorithms/" ;
7+ const GRAPHQL_URL : & str = "https://leetcode-cn .com/graphql" ;
88const QUESTION_QUERY_STRING : & str = r#"
99query questionData($titleSlug: String!) {
1010 question(titleSlug: $titleSlug) {
@@ -20,7 +20,7 @@ const QUESTION_QUERY_OPERATION: &str = "questionData";
2020pub fn get_problem ( id : u32 ) -> Option < Problem > {
2121 let problems = get_problems ( ) . unwrap ( ) ;
2222 for problem in problems. stat_status_pairs . iter ( ) {
23- if problem. stat . question_id == id {
23+ if problem. stat . frontend_question_id == id {
2424 let client = reqwest:: Client :: new ( ) ;
2525 let resp: RawProblem = client. post ( GRAPHQL_URL )
2626 . json ( & Query :: question_query ( problem. stat . question_title_slug . as_ref ( ) . unwrap ( ) ) )
You can’t perform that action at this time.
0 commit comments