aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorFChannel <=>2021-02-16 01:11:55 -0800
committerFChannel <=>2021-02-16 01:11:55 -0800
commit38f01c1910c57af62ea362c37ad3ac2de5b24253 (patch)
tree1797446329cba7fcf046d75c42d4f1f956c213b7 /main.go
parent549e974b9911723b52503e1fde81ce0944e8b76e (diff)
cut down catalog query to only grab op
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