<?php
require_once 'config.php';

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $data = $REQUEST_DATA;
    if (isset($data['module'])) {
        $role = $_SESSION['user_role'] ?? 'usuario';
        logSystemAction("Accedió al módulo", $data['module']);
        response(["success" => true]);
    } else {
        response(["error" => "MODULE_MISSING"], 400);
    }
} else {
    response(["error" => "METHOD_NOT_ALLOWED"], 405);
}
?>