Function delete_module

Source
pub async fn delete_module(
    __arg0: State<AppState>,
    __arg1: Path<i64>,
) -> impl IntoResponse
Expand description

DELETE /api/modules/{module_id}

Permanently deletes a module by ID, including all its assignments and assignment files.
Only accessible by admin users.

ยงResponses

  • 200 OK
{
  "success": true,
  "data": null,
  "message": "Module deleted successfully"
}
  • 403 Forbidden
{
  "success": false,
  "data": null,
  "message": "You do not have permission to perform this action"
}
  • 404 Not Found
{
  "success": false,
  "data": null,
  "message": "Module not found"
}