diff --git a/mqtt/rest/rest.go b/mqtt/rest/rest.go index 0230bf8..1bf056f 100644 --- a/mqtt/rest/rest.go +++ b/mqtt/rest/rest.go @@ -16,6 +16,7 @@ const ( MqttAddBlacklistPath = "/api/v1/mqtt/blacklist/{id}" MqttDelBlacklistPath = "/api/v1/mqtt/blacklist/{id}" MqttPublishMessagePath = "/api/v1/mqtt/message" + MqttGetConfigPath = "/api/v1/mqtt/config" ) type Handler = func(http.ResponseWriter, *http.Request) @@ -32,6 +33,7 @@ func New(server *mqtt.Server) *Rest { func (s *Rest) GenHandlers() map[string]Handler { return map[string]Handler{ + "GET " + MqttGetConfigPath: s.viewConfig, "GET " + MqttGetOverallPath: s.getOverallInfo, "GET " + MqttGetOnlinePath: s.getOnlineCount, "GET " + MqttGetClientPath: s.getClient,