mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 04:22:33 +08:00
feat: 用户信息取首用户
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user