refactor: optimized field names

This commit is contained in:
Marvin Zhang
2024-11-14 11:22:37 +08:00
parent c6ca5cb2a9
commit 4fd1ff8fcf
3 changed files with 5 additions and 5 deletions

View File

@@ -71,7 +71,7 @@ func GetUserList(c *gin.Context) {
}
if role, ok := rolesMap[user.RoleId]; ok {
users[i].Role = role.Name
users[i].IsAdmin = role.Admin
users[i].RootAdminRole = role.RootAdmin
}
}
}
@@ -270,7 +270,7 @@ func getUserById(userId primitive.ObjectID, c *gin.Context) {
return
}
user.Role = role.Name
user.IsAdmin = role.Admin
user.RootAdminRole = role.RootAdmin
}
}