2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 04:22:33 +08:00

feat: 用户信息取首用户

This commit is contained in:
2025-05-17 19:02:52 +08:00
parent a3210c0a92
commit 2f56606789

View File

@@ -127,8 +127,9 @@ func (s *CliService) Fix(ctx context.Context, cmd *cli.Command) error {
}
func (s *CliService) Info(ctx context.Context, cmd *cli.Command) error {
// TODO 未来加权限设置之后这里需要优化
user := new(biz.User)
if err := s.db.Where("id", 1).First(user).Error; err != nil {
if err := s.db.First(user).Error; err != nil {
return errors.New(s.t.Get("Failed to get user info: %v", err))
}