repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
dec2658
parent
6f27168
author
Eric Bower
date
2024-03-11 20:04:30 +0000 UTC
fix(ui): posts should fetch all posts
1 files changed,  +1, -2
M ui/api.go
+1, -2
 1@@ -333,13 +333,12 @@ func getPosts(httpCtx *shared.HttpCtx, ctx ssh.Context, user *db.User, space str
 2 		}
 3 
 4 		dbpool := shared.GetDB(r)
 5-		pages, err := dbpool.FindPostsForUser(&db.Pager{Num: 1000, Page: 0}, user.ID, space)
 6+		posts, err := dbpool.FindAllPostsForUser(user.ID, space)
 7 		if err != nil {
 8 			shared.JSONError(w, err.Error(), http.StatusUnprocessableEntity)
 9 			return
10 		}
11 
12-		posts := pages.Data
13 		if posts == nil {
14 			posts = []*db.Post{}
15 		}