From b64929c10a06cc3243dd431c4d9715af55b23e54 Mon Sep 17 00:00:00 2001 From: ZiHangQin <1420014281@qq.com> Date: Thu, 27 Jul 2023 14:15:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99[=E5=A4=A9=E7=A5=9E=E6=A8=A1=E5=BC=8F]?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=8C=87=E5=AE=9A=E5=95=86=E6=88=B7=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=B7=BB=E5=8A=A0=E6=9D=83=E9=99=90=E8=AE=A4=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/god_mode.go | 3 ++- controller/statistics.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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) }