What: Add an endpoint that imports course content from a JSON file, enabling bulk course creation.
Why: Creating courses through the API one field at a time is slow. Importing from a structured JSON file enables rapid course creation from external content.
Scope: Create endpoint that accepts a JSON file with course structure (title, description, modules, content). Validate the structure, create the course, and return the created course ID.
Acceptance criteria:
- Accepts JSON file with course structure
- Validates all fields before creation
- Creates course with all modules and content
- Returns created course ID
Technical context: src/modules/courses/course.service.ts — course operations. src/modules/courses/course.types.ts — course schemas.
What: Add an endpoint that imports course content from a JSON file, enabling bulk course creation.
Why: Creating courses through the API one field at a time is slow. Importing from a structured JSON file enables rapid course creation from external content.
Scope: Create endpoint that accepts a JSON file with course structure (title, description, modules, content). Validate the structure, create the course, and return the created course ID.
Acceptance criteria:
Technical context:
src/modules/courses/course.service.ts— course operations.src/modules/courses/course.types.ts— course schemas.