From a70467dd96f7dfc074c3565b5a13841dbc5d60ed Mon Sep 17 00:00:00 2001 From: luhaoling <2198702716@qq.com> Date: Mon, 26 Feb 2024 16:51:07 +0800 Subject: [PATCH] fix: import the enough param --- internal/api/msg.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/api/msg.go b/internal/api/msg.go index 93995d41e..bd745df75 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -200,7 +200,7 @@ func (m *MessageApi) SendMessage(c *gin.Context) { } // Check if the user has the app manager role. - if !authverify.IsAppManagerUid(c) { + if !authverify.IsAppManagerUid(c, m.Config) { // Respond with a permission error if the user is not an app manager. apiresp.GinError(c, errs.ErrNoPermission.Wrap("only app manager can send message")) return @@ -257,7 +257,7 @@ func (m *MessageApi) SendBusinessNotification(c *gin.Context) { return } - if !authverify.IsAppManagerUid(c) { + if !authverify.IsAppManagerUid(c, m.Config) { apiresp.GinError(c, errs.ErrNoPermission.Wrap("only app manager can send message")) return } @@ -302,7 +302,7 @@ func (m *MessageApi) BatchSendMsg(c *gin.Context) { return } log.ZInfo(c, "BatchSendMsg", "req", req) - if err := authverify.CheckAdmin(c); err != nil { + if err := authverify.CheckAdmin(c, m.Config); err != nil { apiresp.GinError(c, errs.ErrNoPermission.Wrap("only app manager can send message")) return }