generated from VLADIMIR/template
update and fix
This commit is contained in:
@@ -53,10 +53,7 @@ func (s *Services) AddAction(ctx context.Context, req *proto.AddActionReq) (*pro
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
place, err := s.storyService.GetPlace(req.Place)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
place := s.storyService.GetPlace(req.Place)
|
||||
actions := []*models.Action{
|
||||
{
|
||||
Place: place.Code,
|
||||
@@ -87,10 +84,7 @@ func (s *Services) GetTeam(ctx context.Context, req *proto.GetTeamReq) (*proto.G
|
||||
res := make([]*proto.Action, 0, len(actions))
|
||||
for _, action := range actions {
|
||||
newAction := mapActionToProtoAction(action)
|
||||
place, err := s.storyService.GetPlace(action.Place)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
place := s.storyService.GetPlace(action.Place)
|
||||
newAction.Text = place.Text
|
||||
newAction.Name = place.Name
|
||||
newAction.Applications = make([]*proto.Application, 0, len(place.Applications))
|
||||
@@ -125,7 +119,7 @@ func (s *Services) GetTeams(ctx context.Context, _ *proto.GetTeamsReq) (*proto.G
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
newTeam.SpendTime = int64(20 * len(actions))
|
||||
newTeam.SpendTime = int64(len(actions))
|
||||
applications, err := s.repository.GetApplications(ctx, team.ID, "NEW")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user