generated from VLADIMIR/template
add images
This commit is contained in:
@@ -25,7 +25,6 @@ type Services struct {
|
||||
linkService link.ILinkService
|
||||
passwordGenerator password.IPasswordGenerator
|
||||
pdfGenerator pdf.IPDFGenerator
|
||||
clientHost string
|
||||
}
|
||||
|
||||
func NewServices(
|
||||
@@ -34,7 +33,6 @@ func NewServices(
|
||||
linkService link.ILinkService,
|
||||
passwordGenerator password.IPasswordGenerator,
|
||||
pdfGenerator pdf.IPDFGenerator,
|
||||
clientHost string,
|
||||
) *Services {
|
||||
return &Services{
|
||||
dbService: dbService,
|
||||
@@ -42,7 +40,6 @@ func NewServices(
|
||||
linkService: linkService,
|
||||
passwordGenerator: passwordGenerator,
|
||||
pdfGenerator: pdfGenerator,
|
||||
clientHost: clientHost,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,8 +138,9 @@ func (s *Services) GetTeam(ctx context.Context, req *proto.GetTeamReq) (*proto.G
|
||||
res := make([]*proto.Action, 0, len(actions))
|
||||
for _, place := range s.storyService.GetPlaces(actionsCodes) {
|
||||
newAction := mapPlaceToProtoAction(place)
|
||||
newAction.Text = place.Text
|
||||
newAction.Name = place.Name
|
||||
newAction.Text = place.Text
|
||||
newAction.Image = place.Image
|
||||
newAction.Applications = make([]*proto.Application, 0, len(place.Applications))
|
||||
for _, application := range place.Applications {
|
||||
newAction.Applications = append(newAction.Applications, mapStoryApplicationToProtoApplication(application))
|
||||
@@ -176,7 +174,7 @@ func (s *Services) GetTeams(ctx context.Context, _ *proto.GetTeamsReq) (*proto.G
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
newTeam.Url = s.linkService.GetTeamClientLink(s.clientHost, team.Name, team.Password)
|
||||
newTeam.Url = s.linkService.GetTeamClientLink(team.Name, team.Password)
|
||||
newTeam.SpendTime = int64(len(actions))
|
||||
currentApplications, err := s.dbService.GetApplicationsByState(ctx, team.ID, "NEW")
|
||||
if err != nil {
|
||||
@@ -214,7 +212,7 @@ func (s *Services) DownloadTeamsQrCodesFile(ctx context.Context, req *proto.Down
|
||||
return nil, err
|
||||
}
|
||||
for _, team := range teams {
|
||||
team.Link = s.linkService.GetTeamClientLink(s.clientHost, team.Name, team.Password)
|
||||
team.Link = s.linkService.GetTeamClientLink(team.Name, team.Password)
|
||||
}
|
||||
b, err := s.pdfGenerator.CreateTeamsPDF(teams)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user