Update backend 2
All checks were successful
Deploy to Production / deploy (push) Successful in 19s

This commit is contained in:
silverpro89
2026-02-25 20:05:00 +07:00
parent 085f36078a
commit 47ab75f264
4 changed files with 47 additions and 6 deletions

View File

@@ -17,6 +17,8 @@ class LessonController {
is_published,
is_free,
lesson_type,
lesson_content_type,
chapter_id,
search
} = req.query;
@@ -24,6 +26,9 @@ class LessonController {
const where = {};
// Filters
if (chapter_id) {
where.chapter_id = chapter_id;
}
if (is_published !== undefined) {
where.is_published = is_published === 'true';
}
@@ -33,6 +38,9 @@ class LessonController {
if (lesson_type) {
where.lesson_type = lesson_type;
}
if (lesson_content_type) {
where.lesson_content_type = lesson_content_type;
}
if (search) {
where.lesson_title = { [Op.like]: `%${search}%` };
}