feat: add user created_at and last_login_at

This commit is contained in:
feitianbubu
2026-04-25 12:41:14 +08:00
parent a7c38ec851
commit 02aacb38a2
3 changed files with 27 additions and 1 deletions
+1
View File
@@ -91,6 +91,7 @@ func Login(c *gin.Context) {
// setup session & cookies and then return user info
func setupLogin(user *model.User, c *gin.Context) {
model.UpdateUserLastLoginAt(user.Id)
session := sessions.Default(c)
session.Set("id", user.Id)
session.Set("username", user.Username)