mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 18:20:50 +00:00
refactor🎨: 日志中的位置获取函数添加key传入
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
gaConfig "go-admin/config"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
@@ -104,7 +105,7 @@ func SetDBOperLog(c *gin.Context, clientIP string, statusCode int, reqUri string
|
||||
l["_fullPath"] = c.FullPath()
|
||||
l["operUrl"] = reqUri
|
||||
l["operIp"] = clientIP
|
||||
l["operLocation"] = pkg.GetLocation(clientIP)
|
||||
l["operLocation"] = pkg.GetLocation(clientIP, gaConfig.ExtConfig.AMap.Key)
|
||||
l["operName"] = user.GetUserName(c)
|
||||
l["requestMethod"] = c.Request.Method
|
||||
l["operParam"] = body
|
||||
|
||||
Reference in New Issue
Block a user