统一角色体系为admin/agent/user,修复代理查询角色错误,添加语言切换和明暗切换

This commit is contained in:
Admin
2026-04-29 17:33:54 +08:00
parent 5c63882e71
commit 2a8f32cbb9
21 changed files with 78 additions and 196 deletions
+2 -2
View File
@@ -130,7 +130,7 @@ func handleRegister(c *gin.Context) {
req.Username, req.Email, req.Phone, req.Role, req.Type)
if req.Role == "" {
req.Role = "developer"
req.Role = "admin"
}
username := req.Username
@@ -794,7 +794,7 @@ func handleGetPublicStats(c *gin.Context) {
var totalApps, totalUsers, totalVerifications int64
database.DB.Model(&model.Application{}).Count(&totalApps)
database.DB.Model(&model.User{}).Where("role = ?", "developer").Count(&totalUsers)
database.DB.Model(&model.User{}).Where("role = ?", "admin").Count(&totalUsers)
database.DB.Model(&model.Card{}).Where("status = ?", "used").Count(&totalVerifications)
response.Success(c, gin.H{