Skip to content

Feat/add migration#89

Merged
KietPham-VN merged 2 commits into
mainfrom
feat/Add-migration
Jun 2, 2026
Merged

Feat/add migration#89
KietPham-VN merged 2 commits into
mainfrom
feat/Add-migration

Conversation

@EricN2907

@EricN2907 EricN2907 commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Refactor
    • Improved internal handling of curriculum data processing during course creation and updates.

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 36ec701c-e38f-40e4-945a-9e0bafae8b48

📥 Commits

Reviewing files that changed from the base of the PR and between baf0b87 and 9610f6e.

⛔ Files ignored due to path filters (3)
  • backend/Src/PIED_LMS.Persistence/Migrations/20260602155608_UpdateCourseModel.Designer.cs is excluded by !**/*.Designer.cs, !**/Migrations/** and included by backend/Src/**
  • backend/Src/PIED_LMS.Persistence/Migrations/20260602155608_UpdateCourseModel.cs is excluded by !**/Migrations/** and included by backend/Src/**
  • backend/Src/PIED_LMS.Persistence/Migrations/PiedLmsDbContextModelSnapshot.cs is excluded by !**/Migrations/** and included by backend/Src/**
📒 Files selected for processing (2)
  • backend/Src/PIED_LMS.Contract/Services/Course/Request.cs
  • backend/Src/PIED_LMS.Presentation/APIs/CourseEndpoints.cs

📝 Walkthrough

Walkthrough

The PR shifts curriculum data from strongly-typed form binding to JSON string form binding. Request DTOs now accept curriculum as a string? parameter, and endpoints deserialize it into List<CurriculumSectionDto> before invoking create and update commands.

Changes

Curriculum JSON String Binding and Deserialization

Layer / File(s) Summary
Request contract curriculum parameter type change
backend/Src/PIED_LMS.Contract/Services/Course/Request.cs
CreateCourseRequest and UpdateCourseRequest change curriculum from List<CurriculumSectionDto>? to string? with form-bound parameter decoration.
Endpoint JSON deserialization and command invocation
backend/Src/PIED_LMS.Presentation/APIs/CourseEndpoints.cs
CreateCourse and UpdateCourse endpoints deserialize request.Curriculum string into List<CurriculumSectionDto> and pass the deserialized list to commands instead of the raw string.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • PiedTeam/pied-lms#77: Implements JSON deserialization of curriculum in GetCourseCurriculumHandler using the same CurriculumSectionDto type now bound via JSON strings in requests.
  • PiedTeam/pied-lms#87: Refactors curriculum handling to use strongly-typed List<CurriculumSectionDto> in create and update commands, aligning with this PR's deserialization before command invocation.

Poem

JSON strings now bind in forms so neat, 🎯
Endpoints parse them with deserial heat,
Curriculum flows from string to list—
Data shape migration sealed with a twist. 📋

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/Add-migration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@KietPham-VN KietPham-VN merged commit f4b666d into main Jun 2, 2026
5 of 6 checks passed
@KietPham-VN KietPham-VN deleted the feat/Add-migration branch June 2, 2026 17:09
@coderabbitai coderabbitai Bot mentioned this pull request Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants