-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Lessons are structured units of content (explanations, examples, media) that belong to a category. They serve as the learning material classification β exercises are handled separately.
πΉ Endpoints
GET /categories/:categoryId/lessons
-
β Fetch all lessons under a specific category.
POST /categories/:categoryId/lessons
-
β Create a new lesson inside a category.
-
π Requires admin role.
GET /lessons/:lessonId
-
β Retrieve a specific lesson by ID.
PUT /lessons/:lessonId
-
β Update lesson fields such as title, content, media, or level.
-
π Requires admin role.
DELETE /lessons/:lessonId
-
β Remove a lesson from the database.
-
π Requires admin role.
π§± Lesson Document Structure
Field | Type | Description |
---|---|---|
_id | ObjectId | Auto-generated ID |
categoryId | ObjectId | Reference to the parent category |
title | String | Title of the lesson (e.g., "Past Tense") |
content | String / Object | Lesson explanation (can include text, HTML, or JSON) |
order | Number | Sorting index within category |
duration | Number | Estimated time in minutes |
level | String | "beginner", "intermediate", "advanced" |
createdAt | Date | Timestamp of creation |
updatedAt | Date | Timestamp of last update |
Metadata
Metadata
Assignees
Labels
No labels