generated from VLADIMIR/template
up
This commit is contained in:
@@ -30,7 +30,11 @@ func NewServices(
|
||||
}
|
||||
|
||||
func (s *Services) GiveApplications(ctx context.Context, req *proto.GiveApplicationsReq) (*proto.GiveApplicationsRsp, error) {
|
||||
panic("unimplemented")
|
||||
applications := mapProtoApplicationsToApplications(req.Applications)
|
||||
if err := s.repository.GiveApplications(ctx, req.TeamId, applications); err != nil {
|
||||
return nil, status.Errorf(codes.Internal, err.Error())
|
||||
}
|
||||
return &proto.GiveApplicationsRsp{}, nil
|
||||
}
|
||||
|
||||
func (s *Services) GameStop(ctx context.Context, req *proto.GameStopReq) (*proto.GameStopRsp, error) {
|
||||
@@ -57,7 +61,7 @@ func (s *Services) AddAction(ctx context.Context, req *proto.AddActionReq) (*pro
|
||||
Applications: mapStoryApplicationsToApplications(place.Applications),
|
||||
},
|
||||
}
|
||||
if err := s.repository.AddActions(ctx, actions); err != nil {
|
||||
if err := s.repository.AddActions(ctx, team.ID, actions); err != nil {
|
||||
return nil, status.Errorf(codes.Internal, err.Error())
|
||||
}
|
||||
if err := s.repository.AddApplications(ctx, actions); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user