MCPcopy Create free account
hub / github.com/UESTCByteDance/ByteRhythm / BuildUserModel

Function BuildUserModel

app/user/service/user.go:94–106  ·  view source on GitHub ↗
(username string, password string)

Source from the content-addressed store, hash-verified

92}
93
94func BuildUserModel(username string, password string) model.User {
95 config.Init()
96 avatar := config.Avatar
97 background := config.Background
98 signature := config.Signature
99 return model.User{
100 Username: username,
101 Password: util.Md5(password),
102 Avatar: avatar,
103 BackgroundImage: background,
104 Signature: signature,
105 }
106}
107func BuildUserPbModel(ctx context.Context, user *model.User, token string) *userPb.User {
108 uid := int(user.ID)
109 FollowCount, _ := dao.NewUserDao(ctx).GetFollowCount(uid)

Callers 1

RegisterMethod · 0.85

Calls 2

InitFunction · 0.92
Md5Function · 0.92

Tested by

no test coverage detected