fix: remove double .json suffix in question file fetch URL
Deploy Examination / deploy (push) Successful in 4s
Deploy Examination / deploy (push) Successful in 4s
typeFile from meta.question_files already includes .json extension, so appending .json again caused 404 (e.g. code_reading.json.json).
This commit is contained in:
+1
-1
@@ -435,7 +435,7 @@ async function selectTopic(slug) {
|
||||
|
||||
currentQuestions = [];
|
||||
for (const typeFile of meta.question_files) {
|
||||
const qRes = await fetch(`${topicPath}/${typeFile}.json`);
|
||||
const qRes = await fetch(`${topicPath}/${typeFile}`);
|
||||
const qData = await qRes.json();
|
||||
currentQuestions.push(...qData.questions);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user