add logic

This commit is contained in:
2025-05-17 12:30:24 +07:00
parent e1b342d12c
commit 73838d7773
4 changed files with 56 additions and 7 deletions
+9 -1
View File
@@ -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