fix(challenge-editor): use chapterBasedSuperBlocks from config (#62457)

This commit is contained in:
Huyen Nguyen
2025-10-02 11:24:23 +07:00
committed by GitHub
parent 1214dbed66
commit b77f36f58f

View File

@@ -1,5 +1,7 @@
import { readFile } from 'fs/promises';
import { join } from 'path';
import { chapterBasedSuperBlocks } from '../../../../shared/config/curriculum';
import {
SUPERBLOCK_META_DIR,
BLOCK_META_DIR,
@@ -21,8 +23,6 @@ type BlockLocation = {
currentSuperBlock: string;
};
const chapterBasedSuperBlocks = ['full-stack-developer'];
export const getBlocks = async (sup: string): Promise<BlockLocation> => {
const superBlockDataPath = join(SUPERBLOCK_META_DIR, sup + '.json');
const superBlockMetaFile = await readFile(superBlockDataPath, {