diff --git a/app/api/controller/MqttController.php b/app/api/controller/MqttController.php index 5d7526f..63ab1b7 100644 --- a/app/api/controller/MqttController.php +++ b/app/api/controller/MqttController.php @@ -14,13 +14,14 @@ class MqttController extends BaseApiController private string $username = "root"; private string $password = "root"; private ?ConnectionSettings $settings; + public array $notNeedLogin = ['upload']; /** * @throws ProtocolNotSupportedException */ - public function __construct(App $app) + public function initialize() { - parent::__construct($app); + parent::initialize(); # mqtt配置 $this->mqtt_client = new MqttClient($this->host, $this->port); $this->settings = new ConnectionSettings();