Update information for a specific topic within a unit. Topics are used to organize lessons and learning materials. Only admins and lecturers can update topics.
PATCH
/api/v1/topic/{id}
curl \
--request PATCH 'http://localhost:3500/api/v1/topic/123e4567-e89b-12d3-a456-426614174000' \
--header "Content-Type: application/json" \
--data '{"title":"Introduction to Data Structures","description":"Fundamental concepts of data organization and manipulation"}'
Request examples
Update title
{
"title": "Introduction to Data Structures",
"description": "Fundamental concepts of data organization and manipulation"
}
{
"orderIndex": 2
}
Response examples (200)
{
"topic": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "Introduction to Data Structures",
"orderIndex": 2,
"description": "Fundamental concepts of data organization and manipulation"
},
"message": "Topic updated successfully",
"success": true
}