mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-10 19:23:42 +08:00
opt:Optimize the algorithm to check whether Midjourney images can continue to variation
This commit is contained in:
@@ -157,7 +157,6 @@ func (h *UserHandler) Login(c *gin.Context) {
|
||||
user.LastLoginAt = time.Now().Unix()
|
||||
h.db.Model(&user).Updates(user)
|
||||
|
||||
sessionId := utils.RandString(42)
|
||||
err := utils.SetLoginUser(c, user)
|
||||
if err != nil {
|
||||
resp.ERROR(c, "保存会话失败")
|
||||
@@ -165,9 +164,6 @@ func (h *UserHandler) Login(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// 记录登录信息在服务端
|
||||
h.App.ChatSession.Put(sessionId, types.ChatSession{ClientIP: c.ClientIP(), UserId: user.Id, Username: data.Username, SessionId: sessionId})
|
||||
|
||||
h.db.Create(&model.UserLoginLog{
|
||||
UserId: user.Id,
|
||||
Username: user.Username,
|
||||
@@ -175,7 +171,7 @@ func (h *UserHandler) Login(c *gin.Context) {
|
||||
LoginAddress: utils.Ip2Region(h.searcher, c.ClientIP()),
|
||||
})
|
||||
|
||||
resp.SUCCESS(c, sessionId)
|
||||
resp.SUCCESS(c)
|
||||
}
|
||||
|
||||
// Logout 注 销
|
||||
|
||||
Reference in New Issue
Block a user