Skip to content

Commit a153d61

Browse files
committed
Added restfull api of mqtt config
Added restfull api of mqtt config
1 parent f05f581 commit a153d61

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mqtt/rest/rest.go

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const (
1616
MqttAddBlacklistPath = "/api/v1/mqtt/blacklist/{id}"
1717
MqttDelBlacklistPath = "/api/v1/mqtt/blacklist/{id}"
1818
MqttPublishMessagePath = "/api/v1/mqtt/message"
19+
MqttGetConfigPath = "/api/v1/mqtt/config"
1920
)
2021

2122
type Handler = func(http.ResponseWriter, *http.Request)
@@ -32,6 +33,7 @@ func New(server *mqtt.Server) *Rest {
3233

3334
func (s *Rest) GenHandlers() map[string]Handler {
3435
return map[string]Handler{
36+
"GET " + MqttGetConfigPath: s.viewConfig,
3537
"GET " + MqttGetOverallPath: s.getOverallInfo,
3638
"GET " + MqttGetOnlinePath: s.getOnlineCount,
3739
"GET " + MqttGetClientPath: s.getClient,

0 commit comments

Comments
 (0)