From 3db517715bef6a53225c5c3c06e8fc5fd0bf71e3 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sun, 24 Apr 2022 00:46:49 -0700 Subject: basic pass over view posts, post, catalog and manage page connections --- routes/index.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'routes/index.go') diff --git a/routes/index.go b/routes/index.go index 3599455..5ff2bd4 100644 --- a/routes/index.go +++ b/routes/index.go @@ -3,6 +3,7 @@ package routes import ( "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" ) @@ -13,6 +14,12 @@ func Index(ctx *fiber.Ctx) error { return err } + // this is a activitpub json request return json instead of html page + if util.AcceptActivity(ctx.Get("Accept")) { + db.GetActorInfo(ctx, actor.Id) + return nil + } + var data PageData data.Title = "Welcome to " + actor.PreferredUsername data.PreferredUsername = actor.PreferredUsername -- cgit v1.2.3