From e9747247d58a0423d5e40fda5c5b37b4b4526495 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 23 Jan 2023 13:14:21 +0100 Subject: [feature] Implement `/api/v1/reports` endpoints on client API (#1330) * start adding report client api * route + test reports get * start report create endpoint * you can create reports now babyy * stub account report processor * add single reportGet endpoint * fix test * add more filtering params to /api/v1/reports GET * update swagger * use marshalIndent in tests * add + test missing Link info --- internal/db/report.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/db/report.go') diff --git a/internal/db/report.go b/internal/db/report.go index 216e10fdd..194d00b4f 100644 --- a/internal/db/report.go +++ b/internal/db/report.go @@ -28,6 +28,9 @@ import ( type Report interface { // GetReportByID gets one report by its db id GetReportByID(ctx context.Context, id string) (*gtsmodel.Report, Error) + // GetReports gets limit n reports using the given parameters. + // Parameters that are empty / zero are ignored. + GetReports(ctx context.Context, resolved *bool, accountID string, targetAccountID string, maxID string, sinceID string, minID string, limit int) ([]*gtsmodel.Report, Error) // PutReport puts the given report in the database. PutReport(ctx context.Context, report *gtsmodel.Report) Error // UpdateReport updates one report by its db id. -- cgit v1.2.3