新增:频道(topic)细粒度权限控制,是否允许订阅消息、是否允许发送消息到频道
This commit is contained in:
@@ -28,7 +28,8 @@ func StartWatch() {
|
||||
zsub.Hub.Clearup()
|
||||
c.JSON(http.StatusOK, "+OK")
|
||||
})
|
||||
r.GET("/retimer", func(c *gin.Context) {
|
||||
|
||||
r.GET("/timer/reload", func(c *gin.Context) {
|
||||
zsub.Hub.ReloadTimer()
|
||||
c.JSON(http.StatusOK, "+reload timer ok")
|
||||
})
|
||||
@@ -48,6 +49,12 @@ func StartWatch() {
|
||||
c.JSON(http.StatusOK, "+OK")
|
||||
})
|
||||
|
||||
// reload the auth configuration
|
||||
r.GET("/auth/reload", func(c *gin.Context) {
|
||||
zsub.AuthManager.Reload()
|
||||
c.JSON(http.StatusOK, "+OK")
|
||||
})
|
||||
|
||||
watchAddr := zsub.Conf.Service.Watch
|
||||
r.Run(watchAddr)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user