From: Danila Gorelko <danila@danilax86.space>
Fixes: https://todo.sr.ht/~bouncepaw/betula/80
---
db/queries_posts.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/db/queries_posts.go b/db/queries_posts.go
index 395c58a..02fbaa1 100644
--- a/db/queries_posts.go
+++ b/db/queries_posts.go
@@ -77,8 +77,8 @@ func Posts(authorized bool, page uint) (posts []types.Post, totalPosts uint) {
totalPosts = querySingleValue[uint](`
select count(ID)
from Posts
-where DeletionTime is null;
-`, types.PostsPerPage)
+where DeletionTime is null and (Visibility = 1 or ?);
+`, authorized)
const q = `
select ID, URL, Title, Description, Visibility, CreationTime
--
2.38.5