aboutsummaryrefslogtreecommitdiff
path: root/routes/util.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/util.go
parent5b52d269faa2ce2014d0feba603a2122361cf4eb (diff)
restructured code base to prevent circular dependicies
Diffstat (limited to 'routes/util.go')
-rw-r--r--routes/util.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/routes/util.go b/routes/util.go
index 3d03795..ef7d379 100644
--- a/routes/util.go
+++ b/routes/util.go
@@ -53,13 +53,13 @@ func wantToServePage(actorName string, page int) (activitypub.Collection, bool,
return collection, serve, ErrorPageLimit
}
- actor, err := db.GetActorByNameFromDB(actorName)
+ actor, err := activitypub.GetActorByNameFromDB(actorName)
if err != nil {
return collection, false, err
}
if actor.Id != "" {
- collection, err = db.GetObjectFromDBPage(actor.Id, page)
+ collection, err = activitypub.GetObjectFromDBPage(actor.Id, page)
if err != nil {
return collection, false, err
}
@@ -75,13 +75,13 @@ func wantToServeCatalog(actorName string) (activitypub.Collection, bool, error)
var collection activitypub.Collection
serve := false
- actor, err := db.GetActorByNameFromDB(actorName)
+ actor, err := activitypub.GetActorByNameFromDB(actorName)
if err != nil {
return collection, false, err
}
if actor.Id != "" {
- collection, err = db.GetObjectFromDBCatalog(actor.Id)
+ collection, err = activitypub.GetObjectFromDBCatalog(actor.Id)
if err != nil {
return collection, false, err
}
@@ -97,13 +97,13 @@ func wantToServeArchive(actorName string) (activitypub.Collection, bool, error)
var collection activitypub.Collection
serve := false
- actor, err := db.GetActorByNameFromDB(actorName)
+ actor, err := activitypub.GetActorByNameFromDB(actorName)
if err != nil {
return collection, false, err
}
if actor.Id != "" {
- collection, err = db.GetActorCollectionDBType(actor.Id, "Archive")
+ collection, err = activitypub.GetActorCollectionDBType(actor.Id, "Archive")
if err != nil {
return collection, false, err
}