summaryrefslogtreecommitdiff
path: root/internal/api/client/reports
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/client/reports')
-rw-r--r--internal/api/client/reports/reportcreate.go2
-rw-r--r--internal/api/client/reports/reportget.go2
-rw-r--r--internal/api/client/reports/reports.go4
-rw-r--r--internal/api/client/reports/reports_test.go2
-rw-r--r--internal/api/client/reports/reportsget.go2
5 files changed, 6 insertions, 6 deletions
diff --git a/internal/api/client/reports/reportcreate.go b/internal/api/client/reports/reportcreate.go
index a5f14c6b3..44a62dbc2 100644
--- a/internal/api/client/reports/reportcreate.go
+++ b/internal/api/client/reports/reportcreate.go
@@ -102,7 +102,7 @@ func (m *Module) ReportPOSTHandler(c *gin.Context) {
return
}
- apiReport, errWithCode := m.processor.ReportCreate(c.Request.Context(), authed, form)
+ apiReport, errWithCode := m.processor.Report().Create(c.Request.Context(), authed.Account, form)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return
diff --git a/internal/api/client/reports/reportget.go b/internal/api/client/reports/reportget.go
index 8b08da048..0c478e045 100644
--- a/internal/api/client/reports/reportget.go
+++ b/internal/api/client/reports/reportget.go
@@ -85,7 +85,7 @@ func (m *Module) ReportGETHandler(c *gin.Context) {
return
}
- report, errWithCode := m.processor.ReportGet(c.Request.Context(), authed, targetReportID)
+ report, errWithCode := m.processor.Report().Get(c.Request.Context(), authed.Account, targetReportID)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return
diff --git a/internal/api/client/reports/reports.go b/internal/api/client/reports/reports.go
index 41b61582c..3dcdb8d0f 100644
--- a/internal/api/client/reports/reports.go
+++ b/internal/api/client/reports/reports.go
@@ -38,10 +38,10 @@ const (
)
type Module struct {
- processor processing.Processor
+ processor *processing.Processor
}
-func New(processor processing.Processor) *Module {
+func New(processor *processing.Processor) *Module {
return &Module{
processor: processor,
}
diff --git a/internal/api/client/reports/reports_test.go b/internal/api/client/reports/reports_test.go
index f5f5bf91e..1c5a532b9 100644
--- a/internal/api/client/reports/reports_test.go
+++ b/internal/api/client/reports/reports_test.go
@@ -39,7 +39,7 @@ type ReportsStandardTestSuite struct {
storage *storage.Driver
mediaManager media.Manager
federator federation.Federator
- processor processing.Processor
+ processor *processing.Processor
emailSender email.Sender
sentEmails map[string]string
diff --git a/internal/api/client/reports/reportsget.go b/internal/api/client/reports/reportsget.go
index b53c9527d..ca135be21 100644
--- a/internal/api/client/reports/reportsget.go
+++ b/internal/api/client/reports/reportsget.go
@@ -160,7 +160,7 @@ func (m *Module) ReportsGETHandler(c *gin.Context) {
limit = i
}
- resp, errWithCode := m.processor.ReportsGet(c.Request.Context(), authed, resolved, c.Query(TargetAccountIDKey), c.Query(MaxIDKey), c.Query(SinceIDKey), c.Query(MinIDKey), limit)
+ resp, errWithCode := m.processor.Report().GetMultiple(c.Request.Context(), authed.Account, resolved, c.Query(TargetAccountIDKey), c.Query(MaxIDKey), c.Query(SinceIDKey), c.Query(MinIDKey), limit)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return