aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go28
1 files changed, 27 insertions, 1 deletions
diff --git a/main.go b/main.go
index 3dfad82..bfc2846 100644
--- a/main.go
+++ b/main.go
@@ -204,7 +204,7 @@ func main() {
}
if actorCatalog {
- collection, valid := WantToServe(db, actor.Name)
+ collection, valid := WantToServeCatalog(db, actor.Name)
if valid {
CatalogGet(w, r, db, collection)
}
@@ -1311,6 +1311,19 @@ func GetActorCollectionCache(db *sql.DB, actor Actor) Collection {
return collection
}
+func GetActorCollectionCacheCatalog(db *sql.DB, actor Actor) Collection {
+ var collection Collection
+
+ collection.OrderedItems = GetObjectFromCacheCatalog(db, actor.Id).OrderedItems
+
+ collection.Actor = &actor
+
+ collection.TotalItems = GetObjectPostsTotalCache(db, actor)
+ collection.TotalImgs = GetObjectImgsTotalCache(db, actor)
+
+ return collection
+}
+
func GetActorCollectionDB(db *sql.DB, actor Actor) Collection {
var collection Collection
@@ -1324,6 +1337,19 @@ func GetActorCollectionDB(db *sql.DB, actor Actor) Collection {
return collection
}
+func GetActorCollectionDBCatalog(db *sql.DB, actor Actor) Collection {
+ var collection Collection
+
+ collection.OrderedItems = GetObjectFromDBCatalog(db, actor.Id).OrderedItems
+
+ collection.Actor = &actor
+
+ collection.TotalItems = GetObjectPostsTotalDB(db, actor)
+ collection.TotalImgs = GetObjectImgsTotalDB(db, actor)
+
+ return collection
+}
+
func GetActorCollection(collection string) Collection {
var nCollection Collection