mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2025-12-17 15:49:51 +01:00
Use references instead of pointers whenver possible
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* Copyright (C) 2022 Thomas Basler and others
|
||||
* Copyright (C) 2022-2023 Thomas Basler and others
|
||||
*/
|
||||
#include "WebApi_mqtt.h"
|
||||
#include "Configuration.h"
|
||||
@@ -11,11 +11,11 @@
|
||||
#include "helper.h"
|
||||
#include <AsyncJson.h>
|
||||
|
||||
void WebApiMqttClass::init(AsyncWebServer* server)
|
||||
void WebApiMqttClass::init(AsyncWebServer& server)
|
||||
{
|
||||
using std::placeholders::_1;
|
||||
|
||||
_server = server;
|
||||
_server = &server;
|
||||
|
||||
_server->on("/api/mqtt/status", HTTP_GET, std::bind(&WebApiMqttClass::onMqttStatus, this, _1));
|
||||
_server->on("/api/mqtt/config", HTTP_GET, std::bind(&WebApiMqttClass::onMqttAdminGet, this, _1));
|
||||
|
||||
Reference in New Issue
Block a user