aboutsummaryrefslogtreecommitdiff
path: root/routes/index.go
diff options
context:
space:
mode:
authorFChannel <>2022-04-24 00:46:49 -0700
committerFChannel <>2022-06-19 12:53:29 -0700
commit3db517715bef6a53225c5c3c06e8fc5fd0bf71e3 (patch)
tree9aa7fbcb12f2ec8d0e4e66cd85ace058e38dd32d /routes/index.go
parent9718d34a757b66917747c1c4acfb9b35d154625b (diff)
basic pass over view posts, post, catalog and manage page connections
Diffstat (limited to 'routes/index.go')
-rw-r--r--routes/index.go7
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