mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-20 06:25:07 +00:00
return account created in user service
This commit is contained in:
@@ -83,15 +83,22 @@ func (s *User) Create(ctx context.Context, req *pb.CreateRequest, rsp *pb.Create
|
|||||||
if req.Id == "" {
|
if req.Id == "" {
|
||||||
req.Id = uuid.New().String()
|
req.Id = uuid.New().String()
|
||||||
}
|
}
|
||||||
err = s.domain.Create(ctx, &pb.Account{
|
|
||||||
|
acc := &pb.Account{
|
||||||
Id: req.Id,
|
Id: req.Id,
|
||||||
Username: req.Username,
|
Username: req.Username,
|
||||||
Email: req.Email,
|
Email: req.Email,
|
||||||
Profile: req.Profile,
|
Profile: req.Profile,
|
||||||
}, salt, pp)
|
}
|
||||||
|
|
||||||
|
err = s.domain.Create(ctx, acc, salt, pp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// return the account
|
||||||
|
rsp.Account = acc
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user