diff --git a/controller/god_mode.go b/controller/god_mode.go index 134dc14..eb8fcfd 100644 --- a/controller/god_mode.go +++ b/controller/god_mode.go @@ -3,6 +3,7 @@ package controller import ( "electricity_bill_calc/logger" "electricity_bill_calc/response" + "electricity_bill_calc/security" "electricity_bill_calc/service" "github.com/gofiber/fiber/v2" "go.uber.org/zap" @@ -11,7 +12,7 @@ import ( var GmLog = logger.Named("Handler", "GM") func InitializeGmController(router *fiber.App) { - router.Delete("/gm/tenement", DeleteTenement) + router.Delete("/gm/tenement", security.SingularityAuthorize, DeleteTenement) } //用于将参数转化为切片 diff --git a/controller/statistics.go b/controller/statistics.go index 2d2c07e..fd0555c 100644 --- a/controller/statistics.go +++ b/controller/statistics.go @@ -15,7 +15,7 @@ var StatisticsWithdrawLog = logger.Named("Handler", "StatisticsWithdraw") func InitializeStatisticsController(router *fiber.App) { router.Get("/audits", security.OPSAuthorize, currentAuditAmount) - router.Get("/stat/reports", statReports) + router.Get("/stat/reports", security.OPSAuthorize, statReports) }