clear pdf

This commit is contained in:
2026-03-02 02:01:55 +07:00
parent 6cbf29031c
commit caaed14ebc
5 changed files with 25 additions and 6 deletions
+5 -2
View File
@@ -7,7 +7,7 @@ import (
"evening_detective/internal/models"
"evening_detective/internal/modules/link"
"evening_detective/internal/modules/password"
"evening_detective/internal/services/pdf_service"
"evening_detective/internal/modules/pdf"
"evening_detective/internal/services/story_service"
"evening_detective/proto"
"fmt"
@@ -23,6 +23,7 @@ type Services struct {
storyService *story_service.StoryService
linkService link.ILinkService
passwordGenerator password.IPasswordGenerator
pdfGenerator pdf.IPDFGenerator
clientHost string
}
@@ -31,6 +32,7 @@ func NewServices(
storyService *story_service.StoryService,
linkService link.ILinkService,
passwordGenerator password.IPasswordGenerator,
pdfGenerator pdf.IPDFGenerator,
clientHost string,
) *Services {
return &Services{
@@ -38,6 +40,7 @@ func NewServices(
storyService: storyService,
linkService: linkService,
passwordGenerator: passwordGenerator,
pdfGenerator: pdfGenerator,
clientHost: clientHost,
}
}
@@ -203,7 +206,7 @@ func (s *Services) DownloadTeamsQrCodesFile(ctx context.Context, req *proto.Down
for _, team := range teams {
team.Link = s.linkService.GetTeamClientLink(s.clientHost, team.Name, team.Password)
}
b, err := pdf_service.CreateTeamsPdf(teams)
b, err := s.pdfGenerator.CreateTeamsPDF(teams)
if err != nil {
return nil, err
}