aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorFChannel <=>2021-01-28 12:31:44 -0800
committerFChannel <=>2021-01-28 12:31:44 -0800
commitee3c47a5b2251380ded1239b149fd1f6e6514bfb (patch)
tree4464e74060f84e47ef19a8449cdce02f4307ee0f /main.go
parentfaee9db270a22a42e45210529c7998dcede0087b (diff)
dont write to cache if local actor
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.go b/main.go
index 40428d2..b49d6d8 100644
--- a/main.go
+++ b/main.go
@@ -649,7 +649,7 @@ func main() {
http.SetCookie(w, &http.Cookie{
Name: "session_token",
Value: sessionToken.String(),
- Expires: time.Now().Add(60 * 60 * 24 * 7 * time.Second),
+ Expires: time.Now().Add(60 * 60 * 48 * time.Second),
})
http.Redirect(w, r, "/", http.StatusSeeOther)
@@ -1293,7 +1293,7 @@ func GetActorCollectionCache(db *sql.DB, actor Actor) Collection {
func GetActorCollectionDB(db *sql.DB, actor Actor) Collection {
var collection Collection
- collection.OrderedItems = GetObjectFromDB(db, actor).OrderedItems
+ collection.OrderedItems = GetObjectFromDB(db, actor.Id).OrderedItems
collection.Actor = &actor