MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / GetProfile

Method GetProfile

internal/repository/user.go:168–176  ·  view source on GitHub ↗

GetProfile 通过用户ID获取用户资料

(ctx context.Context, UserID int64)

Source from the content-addressed store, hash-verified

166
167// GetProfile 通过用户ID获取用户资料
168func (ur *userRepository) GetProfile(ctx context.Context, UserID int64) (domain.Profile, error) {
169 profile, err := ur.dao.GetProfileByUserID(ctx, UserID)
170 if err != nil {
171 ur.l.Error("获取用户资料失败", zap.Error(err))
172 return domain.Profile{}, err
173 }
174
175 return profile, nil
176}
177
178// ListUser 获取用户列表
179func (ur *userRepository) ListUser(ctx context.Context, pagination domain.Pagination) ([]domain.UserWithProfile, error) {

Callers

nothing calls this directly

Calls 1

GetProfileByUserIDMethod · 0.65

Tested by

no test coverage detected