From 1892327cee2c3fa1d3bea729bd08eb63c2189a96 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sat, 30 Apr 2022 11:00:55 -0700 Subject: restructured code base to prevent circular dependicies --- routes/outbox.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'routes/outbox.go') diff --git a/routes/outbox.go b/routes/outbox.go index 4b874df..8049bd5 100644 --- a/routes/outbox.go +++ b/routes/outbox.go @@ -3,9 +3,11 @@ package routes import ( "strconv" + "github.com/FChannel0/FChannel-Server/activitypub" "github.com/FChannel0/FChannel-Server/config" "github.com/FChannel0/FChannel-Server/db" "github.com/FChannel0/FChannel-Server/util" + "github.com/FChannel0/FChannel-Server/webfinger" "github.com/gofiber/fiber/v2" ) @@ -17,10 +19,10 @@ func Outbox(ctx *fiber.Ctx) error { func OutboxGet(ctx *fiber.Ctx) error { - actor := db.GetActorByName(ctx.Params("actor")) + actor := webfinger.GetActorByName(ctx.Params("actor")) - if util.AcceptActivity(ctx.Get("Accept")) { - db.GetActorInfo(ctx, actor.Id) + if activitypub.AcceptActivity(ctx.Get("Accept")) { + activitypub.GetActorInfo(ctx, actor.Id) return nil } @@ -79,7 +81,7 @@ func OutboxGet(ctx *fiber.Ctx) error { data.Key = config.Key - data.Boards = db.Boards + data.Boards = webfinger.Boards data.Posts = collection.OrderedItems data.Pages = pages -- cgit v1.2.3