diff options
Diffstat (limited to 'routes/index.go')
-rw-r--r-- | routes/index.go | 7 |
1 files changed, 7 insertions, 0 deletions
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 |