summaryrefslogtreecommitdiff
path: root/internal/typeutils/converter.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/typeutils/converter.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/typeutils/converter.go')
-rw-r--r--internal/typeutils/converter.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/typeutils/converter.go b/internal/typeutils/converter.go
index be05a8a48..c7fd31470 100644
--- a/internal/typeutils/converter.go
+++ b/internal/typeutils/converter.go
@@ -89,6 +89,8 @@ type TypeConverter interface {
DomainBlockToAPIDomainBlock(ctx context.Context, b *gtsmodel.DomainBlock, export bool) (*apimodel.DomainBlock, error)
// ReportToAPIReport converts a gts model report into an api model report, for serving at /api/v1/reports
ReportToAPIReport(ctx context.Context, r *gtsmodel.Report) (*apimodel.Report, error)
+ // ReportToAdminAPIReport converts a gts model report into an admin view report, for serving at /api/v1/admin/reports
+ ReportToAdminAPIReport(ctx context.Context, r *gtsmodel.Report, requestingAccount *gtsmodel.Account) (*apimodel.AdminReport, error)
/*
INTERNAL (gts) MODEL TO FRONTEND (rss) MODEL