diff --git a/src/modules/common/common.go b/src/modules/common/common.go index bb6c68b0..3bbbd97a 100644 --- a/src/modules/common/common.go +++ b/src/modules/common/common.go @@ -52,6 +52,7 @@ func Setup(router *gin.Engine) { // Count: 10, // Type: middleware.LIMIT_IP, // }), + middleware.CryptoApi(true, true), controller.NewAccount.Login, ) indexGroup.GET("/getInfo", middleware.PreAuthorize(nil), controller.NewAccount.Info) @@ -74,6 +75,7 @@ func Setup(router *gin.Engine) { // Count: 10, // Type: middleware.LIMIT_IP, // }), + middleware.CryptoApi(true, true), controller.NewRegister.Register, ) } diff --git a/src/modules/network_element/network_element.go b/src/modules/network_element/network_element.go index bc068e48..89cd4624 100644 --- a/src/modules/network_element/network_element.go +++ b/src/modules/network_element/network_element.go @@ -80,15 +80,18 @@ func Setup(router *gin.Engine) { controller.NewNeInfo.List, ) neInfoGroup.GET("/:infoId", + middleware.CryptoApi(false, true), middleware.PreAuthorize(nil), controller.NewNeInfo.Info, ) neInfoGroup.POST("", + middleware.CryptoApi(true, true), middleware.PreAuthorize(nil), collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.neInfo", collectlogs.BUSINESS_TYPE_INSERT)), controller.NewNeInfo.Add, ) neInfoGroup.PUT("", + middleware.CryptoApi(true, true), middleware.PreAuthorize(nil), collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.neInfo", collectlogs.BUSINESS_TYPE_UPDATE)), controller.NewNeInfo.Edit, @@ -108,6 +111,7 @@ func Setup(router *gin.Engine) { controller.NewNeHost.List, ) neHostGroup.GET("/:hostId", + middleware.CryptoApi(false, true), middleware.PreAuthorize(nil), controller.NewNeHost.Info, )