Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5946701

Browse files
Feat: Add fetchQuery Function
1 parent 1d72b9d commit 5946701

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

‎lib/requests.js‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import axios from "axios";
2+
import config from "../config/config";
3+
4+
export const fetchQuery = async (query) => {
5+
const data = await axios({
6+
url: "http://localhost:8000/api/v1/query",
7+
method: "POST",
8+
data: {
9+
LEETCODE_SESSION: config.env.LEETCODE_SESSION,
10+
CSRFTOKEN: config.env.CSRFTOKEN,
11+
queryData: query,
12+
},
13+
});
14+
return data.data.data;
15+
};
16+
export default { fetchQuery };

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /