feat: show new message count & new user count in home page

This commit is contained in:
JustSong
2023-04-19 15:22:57 +08:00
parent 28f064eedf
commit f5977581d3
5 changed files with 23 additions and 1 deletions
+3
View File
@@ -103,6 +103,9 @@ func (user *User) Insert() error {
}
}
err = DB.Create(user).Error
if err == nil {
common.UserCount += 1 // We don't need to use atomic here, because it's not a critical value
}
return err
}