Refactor import paths to use internal/pkg/httpx/params

- Updated multiple repository and service files to replace imports from "github.com/mlogclub/simple/web/params" with "cs-agent/internal/pkg/httpx/params".
- Adjusted context handling in auth_service and ws_service to use gin.Context instead of iris.Context.
- Ensured consistent usage of HTTP status responses across websocket handlers.
This commit is contained in:
mlogclub
2026-05-23 22:10:20 +08:00
parent f8b1ed42fa
commit 79614b2d07
140 changed files with 1117 additions and 595 deletions
+5 -5
View File
@@ -8,7 +8,7 @@ import (
"cs-agent/internal/pkg/dto/response"
"cs-agent/internal/pkg/enums"
"cs-agent/internal/pkg/errorsx"
"cs-agent/internal/pkg/irisx"
"cs-agent/internal/pkg/httpx"
"cs-agent/internal/pkg/utils"
"cs-agent/internal/repositories"
"cs-agent/internal/wxwork"
@@ -17,10 +17,10 @@ import (
"strings"
"time"
"github.com/kataras/iris/v12"
"cs-agent/internal/pkg/httpx/params"
"github.com/gin-gonic/gin"
"github.com/mlogclub/simple/common/strs"
"github.com/mlogclub/simple/sqls"
"github.com/mlogclub/simple/web/params"
"github.com/silenceper/wechat/v2/work/kf"
)
@@ -369,8 +369,8 @@ func (s *channelService) GetEnabledWxWorkKFChannelByOpenKfID(openKfID string) *m
return nil
}
func (s *channelService) GetEnabledChannel(ctx iris.Context) *models.Channel {
channelID := irisx.GetChannelID(ctx)
func (s *channelService) GetEnabledChannel(ctx *gin.Context) *models.Channel {
channelID := httpx.GetChannelID(ctx)
channel := repositories.ChannelRepository.GetByChannelID(sqls.DB(), channelID)
if channel == nil {
return nil