From 89795236377c1db1821c7ccbbc48a94562a70995 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sat, 4 Jun 2022 11:08:51 -0700 Subject: made view reported posts less gimped --- route/routes/admin.go | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'route/routes') diff --git a/route/routes/admin.go b/route/routes/admin.go index 86e12c6..dfa7313 100644 --- a/route/routes/admin.go +++ b/route/routes/admin.go @@ -226,12 +226,8 @@ func AdminActorIndex(ctx *fiber.Ctx) error { reqActivity.Id = actor.Followers follower, _ := reqActivity.GetCollection() - reqActivity.Id = actor.Id + "/reported" - reported, _ := activitypub.GetActorCollectionReq(reqActivity.Id) - var following []string var followers []string - var reports []db.Report for _, e := range follow.Items { following = append(following, e.Id) @@ -241,28 +237,10 @@ func AdminActorIndex(ctx *fiber.Ctx) error { followers = append(followers, e.Id) } - for _, e := range reported.Items { - var r db.Report - r.Count = int(e.Size) - r.ID = e.Id - r.Reason = e.Content - reports = append(reports, r) - } - - localReports, _ := db.GetLocalReport(actor.Name) - - for _, e := range localReports { - var r db.Report - r.Count = e.Count - r.ID = e.ID - r.Reason = e.Reason - reports = append(reports, r) - } - var data route.AdminPage data.Following = following data.Followers = followers - data.Reported = reports + data.Reported, _ = db.GetLocalReport(actor.Name) data.Domain = config.Domain data.IsLocal, _ = actor.IsLocal() -- cgit v1.2.3