aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorFChannel <=>2021-02-18 00:58:21 -0800
committerFChannel <=>2021-02-18 00:58:21 -0800
commitaa42546b2786138330ddd921b340a2b0f9898d5c (patch)
tree35dc1f7d168e8059f3429ebd9d55ee763eeea3d2 /main.go
parent38f01c1910c57af62ea362c37ad3ac2de5b24253 (diff)
limit number of post and replies queried for page views with pagination
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.go b/main.go
index bfc2846..fec34f0 100644
--- a/main.go
+++ b/main.go
@@ -175,7 +175,10 @@ func main() {
return
}
- collection, valid := WantToServe(db, actor.Name)
+ postNum := strings.Replace(r.URL.EscapedPath(), "/" + actor.Name + "/", "", 1)
+
+ page, _ := strconv.Atoi(postNum)
+ collection, valid := WantToServePage(db, actor.Name, page)
if valid {
OutboxGet(w, r, db, collection)
}