fix: fix name error
This commit is contained in:
1 parent
16d6aebbc2
commit
84a78d7b4f
2 files changed
+4
-4
No files matched your search
+3
-3
@@ -4,10 +4,10 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/mojocn/base64Captcha"
|
||||
"github.com/mssola/user_agent"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"go-admin/models"
|
||||
jwt "go-admin/pkg/jwtauth"
|
||||
"go-admin/tools"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@@ -59,7 +59,7 @@ func Authenticator(c *gin.Context) (interface{}, error) {
|
||||
loginlog.Ipaddr = c.ClientIP()
|
||||
location := tools.GetLocation(c.ClientIP())
|
||||
loginlog.LoginLocation = location
|
||||
loginlog.LoginTime = tools.GetCurrntTime()
|
||||
loginlog.LoginTime = tools.GetCurrentTime()
|
||||
loginlog.Status = "0"
|
||||
loginlog.Remark = c.Request.UserAgent()
|
||||
browserName, browserVersion := ua.Browser()
|
||||
@@ -112,7 +112,7 @@ func LogOut(c *gin.Context) {
|
||||
loginlog.Ipaddr = c.ClientIP()
|
||||
location := tools.GetLocation(c.ClientIP())
|
||||
loginlog.LoginLocation = location
|
||||
loginlog.LoginTime = tools.GetCurrntTime()
|
||||
loginlog.LoginTime = tools.GetCurrentTime()
|
||||
loginlog.Status = "0"
|
||||
loginlog.Remark = c.Request.UserAgent()
|
||||
browserName, browserVersion := ua.Browser()
|
||||
|
||||
@@ -93,7 +93,7 @@ func SetDBOperLog(c *gin.Context, clientIP string, statusCode int, reqUri string
|
||||
b, _ := c.Get("body")
|
||||
sysOperLog.OperParam, _ = tools.StructToJsonStr(b)
|
||||
sysOperLog.CreateBy = tools.GetUserName(c)
|
||||
sysOperLog.OperTime = tools.GetCurrntTime()
|
||||
sysOperLog.OperTime = tools.GetCurrentTime()
|
||||
sysOperLog.LatencyTime = (latencyTime).String()
|
||||
sysOperLog.UserAgent = c.Request.UserAgent()
|
||||
if c.Err() == nil {
|
||||
|
||||
Reference in new issue
Block a user