Skip to main content

🔧 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​
ParameterTypeRequiredDescription
commandUpdateContentsCommandYesCommand 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​
ParameterTypeRequiredDescription
commandDeleteContentsCommandYesCommand 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