aboutsummaryrefslogtreecommitdiff
path: root/routes/index.go
diff options
context:
space:
mode:
authorFChannel <>2022-04-30 11:00:55 -0700
committerFChannel <>2022-06-19 12:53:29 -0700
commit1892327cee2c3fa1d3bea729bd08eb63c2189a96 (patch)
tree7b846f7d9caf46fba6c9d15ff81b9d89dcca9476 /routes/index.go
parent5b52d269faa2ce2014d0feba603a2122361cf4eb (diff)
restructured code base to prevent circular dependicies
Diffstat (limited to 'routes/index.go')
-rw-r--r--routes/index.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/routes/index.go b/routes/index.go
index 23b3f39..015ad0c 100644
--- a/routes/index.go
+++ b/routes/index.go
@@ -1,22 +1,22 @@
package routes
import (
+ "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"
)
func Index(ctx *fiber.Ctx) error {
- actor, err := db.GetActorFromDB(config.Domain)
+ actor, err := activitypub.GetActorFromDB(config.Domain)
if err != nil {
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)
+ if activitypub.AcceptActivity(ctx.Get("Accept")) {
+ activitypub.GetActorInfo(ctx, actor.Id)
return nil
}
@@ -38,7 +38,7 @@ func Index(ctx *fiber.Ctx) error {
data.Title = "Welcome to " + actor.PreferredUsername
data.PreferredUsername = actor.PreferredUsername
- data.Boards = db.Boards
+ data.Boards = webfinger.Boards
data.Board.Name = ""
data.Key = config.Key
data.Board.Domain = config.Domain