del: 移除无用的mux路由函数

This commit is contained in:
TsMask
2024-05-17 10:51:27 +08:00
parent 371a244013
commit 8b64dfa10d
52 changed files with 9 additions and 9956 deletions

View File

@@ -11,8 +11,8 @@ import (
"strings"
"time"
"be.ems/lib/core/utils/ctx"
"be.ems/lib/core/utils/parse"
"be.ems/lib/dborm"
"be.ems/src/framework/constants/common"
"be.ems/src/framework/middleware/collectlogs"
"be.ems/src/framework/utils/ip2region"
@@ -47,13 +47,7 @@ func LogOperate(options collectlogs.Options) func(http.Handler) http.Handler {
funcName = funcName[lastDotIndex+1:]
// 用户名
username := "-"
accessToken := r.Header.Get("AccessToken")
if accessToken != "" {
// 验证令牌 == 这里直接查数据库session
se, _ := dborm.XormUpdateSessionShakeTime(accessToken)
username = se.AccountId
}
username := ctx.LoginUserToUserName(r)
// 解析ip地址
ip := strings.Split(r.RemoteAddr, ":")[0]