diff options
author | FChannel <=> | 2021-02-16 01:11:55 -0800 |
---|---|---|
committer | FChannel <=> | 2021-02-16 01:11:55 -0800 |
commit | 38f01c1910c57af62ea362c37ad3ac2de5b24253 (patch) | |
tree | 1797446329cba7fcf046d75c42d4f1f956c213b7 /main.go | |
parent | 549e974b9911723b52503e1fde81ce0944e8b76e (diff) |
cut down catalog query to only grab op
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 28 |
1 files changed, 27 insertions, 1 deletions
@@ -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 |