generated from VLADIMIR/template
clear
This commit is contained in:
@@ -22,17 +22,20 @@ type Services struct {
|
||||
repository *Repository
|
||||
storyService *story_service.StoryService
|
||||
linkService link.ILinkService
|
||||
clientHost string
|
||||
}
|
||||
|
||||
func NewServices(
|
||||
repository *Repository,
|
||||
storyService *story_service.StoryService,
|
||||
linkService link.ILinkService,
|
||||
clientHost string,
|
||||
) *Services {
|
||||
return &Services{
|
||||
repository: repository,
|
||||
storyService: storyService,
|
||||
linkService: linkService,
|
||||
clientHost: clientHost,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,10 +160,7 @@ func (s *Services) GetTeams(ctx context.Context, _ *proto.GetTeamsReq) (*proto.G
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
newTeam.Url, err = s.linkService.GetTeamClientLink(team.Name, team.Password)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
newTeam.Url = s.linkService.GetTeamClientLink(s.clientHost, team.Name, team.Password)
|
||||
newTeam.SpendTime = int64(len(actions))
|
||||
currentApplications, err := s.repository.GetApplicationsByState(ctx, team.ID, "NEW")
|
||||
if err != nil {
|
||||
@@ -198,10 +198,7 @@ func (s *Services) DownloadTeamsQrCodesFile(ctx context.Context, req *proto.Down
|
||||
return nil, err
|
||||
}
|
||||
for _, team := range teams {
|
||||
team.Link, err = s.linkService.GetTeamClientLink(team.Name, team.Password)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
team.Link = s.linkService.GetTeamClientLink(s.clientHost, team.Name, team.Password)
|
||||
}
|
||||
b, err := pdf_service.CreateTeamsPdf(teams)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user