Skip to content

Commit 105c841

Browse files
SmallTeddywh131462
authored andcommitted
fix(headers): remove useless header configuration
1 parent 3ba1a98 commit 105c841

5 files changed

+38
-38
lines changed

resources/headers/codeDetailJson.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
export function getCodeDetailJson(todayQuestionEnName) {
2-
return {
3-
headers: { "content-type": "application/json" },
4-
body: `{"query":"\\n query questionEditorData($titleSlug: String!) {\\n question(titleSlug: $titleSlug) {\\n questionId\\n questionFrontendId\\n codeSnippets {\\n lang\\n langSlug\\n code\\n }\\n envInfo\\n enableRunCode\\n hasFrontendPreview\\n frontendPreviews\\n }\\n}\\n ","variables":{"titleSlug":"${todayQuestionEnName}"},"operationName":"questionEditorData"}`,
5-
method: 'POST',
6-
};
7-
}
1+
export function getCodeDetailJson(todayQuestionEnName) {
2+
return {
3+
headers: { "content-type": "application/json" },
4+
body: `{"query":"\\n query questionEditorData($titleSlug: String!) {\\n question(titleSlug: $titleSlug) {\\n questionId\\n questionFrontendId\\n codeSnippets {\\n lang\\n langSlug\\n code\\n }\\n envInfo\\n enableRunCode\\n hasFrontendPreview\\n frontendPreviews\\n }\\n}\\n ","variables":{"titleSlug":"${todayQuestionEnName}"},"operationName":"questionEditorData"}`,
5+
method: 'POST',
6+
};
7+
}
+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
export function getQuestionDetailJson(slug) {
2-
return {
3-
headers: { "content-type": "application/json" },
4-
body: `{"query":"\\n query questionTranslations($titleSlug: String!) {\\n question(titleSlug: $titleSlug) {\\n translatedTitle\\n translatedContent\\n }\\n}\\n ","variables":{"titleSlug":"${slug}"},"operationName":"questionTranslations"}`,
5-
method: 'POST',
6-
};
7-
}
1+
export function getQuestionDetailJson(slug) {
2+
return {
3+
headers: { "content-type": "application/json" },
4+
body: `{"query":"\\n query questionTranslations($titleSlug: String!) {\\n question(titleSlug: $titleSlug) {\\n translatedTitle\\n translatedContent\\n }\\n}\\n ","variables":{"titleSlug":"${slug}"},"operationName":"questionTranslations"}`,
5+
method: 'POST',
6+
};
7+
}

resources/headers/questionListJson.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
export function getQuestionListJson(skip = 0, limit = 50) {
2-
return {
3-
headers: { "content-type": "application/json" },
4-
body: `{"query":"query problemsetQuestionList($categorySlug: String, $limit: Int, $skip: Int, $filters: QuestionListFilterInput) {\\nproblemsetQuestionList(\\ncategorySlug: $categorySlug\\nlimit: $limit\\nskip: $skip\\nfilters: $filters) {\\ntotal\\nquestions {\\n frontendQuestionId\\n title\\n titleCn\\n titleSlug\\n}\\n}\\n}","variables":{"categorySlug":"all-code-essentials","skip":${skip},"limit":${limit},"filters":{}},"operationName":"problemsetQuestionList"}`,
5-
method: 'POST',
6-
};
7-
}
8-
1+
export function getQuestionListJson(skip = 0, limit = 50) {
2+
return {
3+
headers: { "content-type": "application/json" },
4+
body: `{"query":"query problemsetQuestionList($categorySlug: String, $limit: Int, $skip: Int, $filters: QuestionListFilterInput) {\\nproblemsetQuestionList(\\ncategorySlug: $categorySlug\\nlimit: $limit\\nskip: $skip\\nfilters: $filters) {\\ntotal\\nquestions {\\n frontendQuestionId\\n title\\n titleCn\\n titleSlug\\n}\\n}\\n}","variables":{"categorySlug":"all-code-essentials","skip":${skip},"limit":${limit},"filters":{}},"operationName":"problemsetQuestionList"}`,
5+
method: 'POST',
6+
};
7+
}
8+

resources/headers/questionSearchJson.js

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+8-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
export function getQuestionTodayJson() {
2-
return {
3-
headers: { "content-type": "application/json" },
4-
body: '{"query":"\\n query questionOfToday {\\n todayRecord {\\n date\\n userStatus\\n question {\\n questionId\\n frontendQuestionId: questionFrontendId\\n difficulty\\n title\\n titleCn: translatedTitle\\n titleSlug\\n paidOnly: isPaidOnly\\n freqBar\\n isFavor\\n acRate\\n status\\n solutionNum\\n hasVideoSolution\\n topicTags {\\n name\\n nameTranslated: translatedName\\n id\\n }\\n extra {\\n topCompanyTags {\\n imgUrl\\n slug\\n numSubscribed\\n }\\n }\\n }\\n lastSubmission {\\n id\\n }\\n }\\n}\\n ","variables":{},"operationName":"questionOfToday"}',
5-
method: 'POST',
6-
};
7-
}
8-
1+
export function getQuestionTodayJson() {
2+
return {
3+
headers: { "content-type": "application/json" },
4+
body: '{"query":"\\n query questionOfToday {\\n todayRecord {\\n date\\n userStatus\\n question {\\n questionId\\n frontendQuestionId: questionFrontendId\\n difficulty\\n title\\n titleCn: translatedTitle\\n titleSlug\\n paidOnly: isPaidOnly\\n freqBar\\n isFavor\\n acRate\\n status\\n solutionNum\\n hasVideoSolution\\n topicTags {\\n name\\n nameTranslated: translatedName\\n id\\n }\\n extra {\\n topCompanyTags {\\n imgUrl\\n slug\\n numSubscribed\\n }\\n }\\n }\\n lastSubmission {\\n id\\n }\\n }\\n}\\n ","variables":{},"operationName":"questionOfToday"}',
5+
method: 'POST',
6+
};
7+
}
8+

0 commit comments

Comments
 (0)