summaryrefslogtreecommitdiff
path: root/internal/processing/admin.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-01-25 11:12:17 +0100
committerLibravatar GitHub <noreply@github.com>2023-01-25 11:12:17 +0100
commitfaeb7ded3b5d595910f424fd9cf9c6fe5935e648 (patch)
tree5c50b950277ab985e73bfaf027b53ee82f4917a6 /internal/processing/admin.go
parent[chore] Settings refactor fix4 (#1383) (diff)
downloadgotosocial-faeb7ded3b5d595910f424fd9cf9c6fe5935e648.tar.xz
[feature] Implement reports admin API so admins can view + close reports (#1378)
* add admin report api endpoints + tests * [chore] remove funky duplicate attachment in testrig
Diffstat (limited to 'internal/processing/admin.go')
-rw-r--r--internal/processing/admin.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/processing/admin.go b/internal/processing/admin.go
index 1b4744967..b85185290 100644
--- a/internal/processing/admin.go
+++ b/internal/processing/admin.go
@@ -81,3 +81,15 @@ func (p *processor) AdminMediaPrune(ctx context.Context, mediaRemoteCacheDays in
func (p *processor) AdminMediaRefetch(ctx context.Context, authed *oauth.Auth, domain string) gtserror.WithCode {
return p.adminProcessor.MediaRefetch(ctx, authed.Account, domain)
}
+
+func (p *processor) AdminReportsGet(ctx context.Context, authed *oauth.Auth, resolved *bool, accountID string, targetAccountID string, maxID string, sinceID string, minID string, limit int) (*apimodel.PageableResponse, gtserror.WithCode) {
+ return p.adminProcessor.ReportsGet(ctx, authed.Account, resolved, accountID, targetAccountID, maxID, sinceID, minID, limit)
+}
+
+func (p *processor) AdminReportGet(ctx context.Context, authed *oauth.Auth, id string) (*apimodel.AdminReport, gtserror.WithCode) {
+ return p.adminProcessor.ReportGet(ctx, authed.Account, id)
+}
+
+func (p *processor) AdminReportResolve(ctx context.Context, authed *oauth.Auth, id string, actionTakenComment *string) (*apimodel.AdminReport, gtserror.WithCode) {
+ return p.adminProcessor.ReportResolve(ctx, authed.Account, id, actionTakenComment)
+}