fix(auth): 登录时间写回保留并发停用状态 (#685)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Catlaxy AI
2026-10-06 09:23:42 +08:00
committed by GitHub
parent ad766bb643
commit aa1ba12a0b
4 changed files with 135 additions and 2 deletions

View File

@@ -263,7 +263,7 @@ func (s *Service) CompleteLinuxDOLogin(stateValue string, code string) (*LinuxDO
now := time.Now()
user.LastLoginAt = &now
user.UpdatedAt = now
if err := s.repo.Save(user); err != nil {
if err := s.repo.UpdateUserLoginTime(user.ID, now); err != nil {
return nil, err
}
s.host.RecordActivity(user.ID, "login", 1)