-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
π§© Task: Create an endpoint to manage modules
Create an endpoint for Manage Module in:
π‘ API Endpoints β Module Management
| Method | Endpoint | Description | Request Body (if applicable) |
|---|---|---|---|
| POST | /modules |
Create a new module | ModuleRequest JSON payload |
| GET | /modules |
Get all modules | No need to paginate |
| GET | /modules/:id |
Get a module by ID | - |
| PUT | /modules/:id |
Update an existing module | ModuleRequest JSON payload |
| DELETE | /modules |
Delete single or multiple modules | JSON with ids and forceDelete flag |
π§Ύ Reference: Follows the same structure as
/owners (DELETE)API
π§Ύ README: https://github.com/thanthtooaung-coding/lms-grpc/blob/main/README.md
𧨠DELETE /modules β Request Body Format
{
"ids": [
"uuid-1",
"uuid-2"
],
"forceDelete": true
}idsβ Array of Modules IDs to delete.forceDeleteβ Boolean flag:true: force delete even if linked.false: only delete if no constraint.
πΏ Git Workflow Instructions
1. Sync with dev branch
Before starting work:
git checkout dev
git pull origin dev2. Create a new feature branch
git switch -c ft/cms1-613. Make your changes
Work on your task as described above.
4. Add and commit your changes
Use git commit to create a conventional commit message:
git add . or git add file1.go file2.go
git commit -m "your commit-message"β Write the appropriate commit message with your changes
5. Push your branch
git push origin ft/cms1-61β Once done
Open a Pull Request to dev and request a review.
Let me know if you want me to generate a scaffold or example code block for any part of this!