We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f05f581 commit a153d61Copy full SHA for a153d61
mqtt/rest/rest.go
@@ -16,6 +16,7 @@ const (
16
MqttAddBlacklistPath = "/api/v1/mqtt/blacklist/{id}"
17
MqttDelBlacklistPath = "/api/v1/mqtt/blacklist/{id}"
18
MqttPublishMessagePath = "/api/v1/mqtt/message"
19
+ MqttGetConfigPath = "/api/v1/mqtt/config"
20
)
21
22
type Handler = func(http.ResponseWriter, *http.Request)
@@ -32,6 +33,7 @@ func New(server *mqtt.Server) *Rest {
32
33
34
func (s *Rest) GenHandlers() map[string]Handler {
35
return map[string]Handler{
36
+ "GET " + MqttGetConfigPath: s.viewConfig,
37
"GET " + MqttGetOverallPath: s.getOverallInfo,
38
"GET " + MqttGetOnlinePath: s.getOnlineCount,
39
"GET " + MqttGetClientPath: s.getClient,
0 commit comments