Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/modules/ncert/ncert.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class NcertController {
const classId = requireNcertParam(query, ['classId', 'class']);
const subjectId = requireNcertParam(query, ['subjectId', 'subject']);

const page = Math.max(1, parseInt(query.page as string) || 1);
const page = Math.max(1, parseInt(query.page as string, 10) || 1);
const limit = Math.min(100, Math.max(1, parseInt(query.limit as string) || 20));

const res = await NcertServices.getChapters(
Expand Down
2 changes: 1 addition & 1 deletion src/prisma/seed-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ async function seedChapterContent() {
return result;
}

const classFolders = (await readdir(learnerMdRoot)).sort();
const classFolders = (await readdir(learnerMdRoot)).sort((a, b) => a - b);

for (const classFolder of classFolders) {
const grade = parseGrade(classFolder);
Expand Down
Loading