Fix bot review

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-01-30 19:13:10 +04:00
parent e13ff134ed
commit d9c07ecdef
20 changed files with 54 additions and 31 deletions

View File

@@ -582,6 +582,7 @@ func (s AuthService) SendMagicLink(ctx context.Context, req *SendMagicLinkReques
subject, textBody, htmlBody, err := emailPresenter.RenderMagicLink(
req.URLPath,
tokenString,
s.magicLinkTokenValidity,
organization.Name,
)

View File

@@ -153,7 +153,7 @@ func (s *CompliancePageService) EmailPresenterConfig(ctx context.Context, compli
// If logo exists, then we will brand the emails with the org as a sender
presignedURL, err := s.fm.GenerateFileUrl(ctx, logoFile, 1*time.Hour)
presignedURL, err := s.fm.GenerateFileUrl(ctx, logoFile, 7*24*time.Hour)
if err != nil {
return emailPresenterCfg, fmt.Errorf("cannot generate file URL: %w", err)
}

View File

@@ -593,8 +593,8 @@ func (s *OrganizationService) CreateOrganization(
var (
fileID = gid.New(tenantID, coredata.FileEntityType)
objectKey = uuid.MustNewV7()
filename = req.LogoFile.Filename
contentType = req.LogoFile.ContentType
filename = req.HorizontalLogoFile.Filename
contentType = req.HorizontalLogoFile.ContentType
now = time.Now()
)
@@ -604,7 +604,7 @@ func (s *OrganizationService) CreateOrganization(
MimeType: contentType,
FileName: filename,
FileKey: objectKey.String(),
FileSize: req.LogoFile.Size,
FileSize: req.HorizontalLogoFile.Size,
CreatedAt: now,
UpdatedAt: now,
}

View File

@@ -420,14 +420,15 @@ func (s TrustCenterService) uploadFile(
fileID := gid.New(s.svc.scope.GetTenantID(), coredata.FileEntityType)
file := &coredata.File{
ID: fileID,
BucketName: s.svc.bucket,
MimeType: mimeType,
FileName: fileUpload.Filename,
FileKey: objectKey.String(),
FileSize: *headOutput.ContentLength,
CreatedAt: now,
UpdatedAt: now,
ID: fileID,
OrganizationID: trustCenter.OrganizationID,
BucketName: s.svc.bucket,
MimeType: mimeType,
FileName: fileUpload.Filename,
FileKey: objectKey.String(),
FileSize: *headOutput.ContentLength,
CreatedAt: now,
UpdatedAt: now,
}
if err := file.Insert(ctx, conn, s.svc.scope); err != nil {
@@ -638,7 +639,7 @@ func (s *TrustCenterService) EmailPresenterConfig(ctx context.Context, complianc
return emailPresenterCfg, nil
}
presignedURL, err := s.svc.fileManager.GenerateFileUrl(ctx, logoFile, 1*time.Hour)
presignedURL, err := s.svc.fileManager.GenerateFileUrl(ctx, logoFile, 7*24*time.Hour)
if err != nil {
return emailPresenterCfg, fmt.Errorf("cannot generate file URL: %w", err)
}

View File

@@ -288,7 +288,7 @@ func (s *TrustCenterService) EmailPresenterConfig(ctx context.Context, complianc
// If logo exists, then we will brand the emails with the org as a sender
presignedURL, err := s.svc.fileManager.GenerateFileUrl(ctx, logoFile, 1*time.Hour)
presignedURL, err := s.svc.fileManager.GenerateFileUrl(ctx, logoFile, 7*24*time.Hour)
if err != nil {
return emailPresenterCfg, fmt.Errorf("cannot generate file URL: %w", err)
}