summaryrefslogtreecommitdiff
path: root/internal/processing/report
diff options
context:
space:
mode:
Diffstat (limited to 'internal/processing/report')
-rw-r--r--internal/processing/report/create.go2
-rw-r--r--internal/processing/report/get.go4
-rw-r--r--internal/processing/report/report.go10
3 files changed, 8 insertions, 8 deletions
diff --git a/internal/processing/report/create.go b/internal/processing/report/create.go
index 48f9c1ee4..c65ae0d52 100644
--- a/internal/processing/report/create.go
+++ b/internal/processing/report/create.go
@@ -99,7 +99,7 @@ func (p *Processor) Create(ctx context.Context, account *gtsmodel.Account, form
TargetAccount: targetAccount,
})
- apiReport, err := p.tc.ReportToAPIReport(ctx, report)
+ apiReport, err := p.converter.ReportToAPIReport(ctx, report)
if err != nil {
err = fmt.Errorf("error converting report to frontend representation: %w", err)
return nil, gtserror.NewErrorInternalError(err)
diff --git a/internal/processing/report/get.go b/internal/processing/report/get.go
index f39648832..c5c4fc223 100644
--- a/internal/processing/report/get.go
+++ b/internal/processing/report/get.go
@@ -45,7 +45,7 @@ func (p *Processor) Get(ctx context.Context, account *gtsmodel.Account, id strin
return nil, gtserror.NewErrorNotFound(err)
}
- apiReport, err := p.tc.ReportToAPIReport(ctx, report)
+ apiReport, err := p.converter.ReportToAPIReport(ctx, report)
if err != nil {
return nil, gtserror.NewErrorInternalError(fmt.Errorf("error converting report to api: %s", err))
}
@@ -79,7 +79,7 @@ func (p *Processor) GetMultiple(
prevMinIDValue := reports[0].ID
for _, r := range reports {
- item, err := p.tc.ReportToAPIReport(ctx, r)
+ item, err := p.converter.ReportToAPIReport(ctx, r)
if err != nil {
return nil, gtserror.NewErrorInternalError(fmt.Errorf("error converting report to api: %s", err))
}
diff --git a/internal/processing/report/report.go b/internal/processing/report/report.go
index 2fb11bc7f..c871172bb 100644
--- a/internal/processing/report/report.go
+++ b/internal/processing/report/report.go
@@ -23,13 +23,13 @@ import (
)
type Processor struct {
- state *state.State
- tc typeutils.TypeConverter
+ state *state.State
+ converter *typeutils.Converter
}
-func New(state *state.State, tc typeutils.TypeConverter) Processor {
+func New(state *state.State, converter *typeutils.Converter) Processor {
return Processor{
- state: state,
- tc: tc,
+ state: state,
+ converter: converter,
}
}