return account created in user service

This commit is contained in:
Asim Aslam
2021-08-16 14:30:23 +01:00
parent b966fcbd98
commit 432b31f56e

View File

@@ -83,15 +83,22 @@ func (s *User) Create(ctx context.Context, req *pb.CreateRequest, rsp *pb.Create
if req.Id == "" {
req.Id = uuid.New().String()
}
err = s.domain.Create(ctx, &pb.Account{
acc := &pb.Account{
Id: req.Id,
Username: req.Username,
Email: req.Email,
Profile: req.Profile,
}, salt, pp)
}
err = s.domain.Create(ctx, acc, salt, pp)
if err != nil {
return err
}
// return the account
rsp.Account = acc
return nil
}