generated from VLADIMIR/template
add logic
This commit is contained in:
@@ -45,9 +45,13 @@ 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
|
||||
}
|
||||
actions := []*models.Action{
|
||||
{
|
||||
Place: req.Place,
|
||||
Place: place.Code,
|
||||
TeamID: team.ID,
|
||||
},
|
||||
}
|
||||
@@ -79,6 +83,10 @@ func (s *Services) GetTeam(ctx context.Context, req *proto.GetTeamReq) (*proto.G
|
||||
return nil, err
|
||||
}
|
||||
newAction.Text = place.Text
|
||||
newAction.Applications = make([]*proto.Application, 0, len(place.Applications))
|
||||
for _, application := range place.Applications {
|
||||
newAction.Applications = append(newAction.Applications, mapApplicationToProtoApplication(application))
|
||||
}
|
||||
res = append(res, newAction)
|
||||
}
|
||||
return &proto.GetTeamRsp{Actions: res}, err
|
||||
|
||||
Reference in New Issue
Block a user