đ§ Content Controller Documentation
QUICK DOCUMENTATIONâ
- File Path: /API/Controllers/ContentController.cs
- Primary Purpose: Manages content-related operations in the application
- Key Endpoints:
- đ POST /UpdateContents - Updates content in the system
- đī¸ POST /DeleteContent - Deletes content from the system
- Related Models: UpdateContentsCommand, DeleteContentsCommand
- Used By: Content management functionality in the web application
DETAILED DOCUMENTATIONâ
đ Overviewâ
The ContentController provides basic functionality for updating and deleting content within the application. It uses a logger for tracking operations and the Mediator pattern to process requests.
đī¸ Controller Dependenciesâ
- Namespace: AVP.API.Controllers
- Services Used: Mediator, ILogger for ContentController
- Other Dependencies: None
đ Endpointsâ
đ UpdateContentsâ
- HTTP Method: POST
- URL Pattern: /UpdateContents
- Authentication: đ Required (inherited from ApiController)
- Description: Updates content in the system
Request Parametersâ
| Parameter | Type | Required | Description |
|---|---|---|---|
| command | UpdateContentsCommand | Yes | Command containing content to be updated |
Response Formatâ
Returns a string response indicating the result of the update operation.
đī¸ DeleteContentâ
- HTTP Method: POST
- URL Pattern: /DeleteContent
- Authentication: đ Required
- Description: Deletes content from the system
Request Parametersâ
| Parameter | Type | Required | Description |
|---|---|---|---|
| command | DeleteContentsCommand | Yes | Command containing the ID of content to delete |
Response Formatâ
Returns an integer indicating the number of content items deleted or the result code.
đĄ Tips for Content Managementâ
- âšī¸ Content updates are logged for audit purposes
- â ī¸ Content deletion is permanent and cannot be undone
- â Proper validation is performed before any content modifications