~tsileo/microblog.pub-devel

microblog.pub: Order by is_pinned before published date v1 APPLIED

Hi @~tsileo,

I am surprised this actually works, but it seems to fix
https://todo.sr.ht/~tsileo/microblog.pub/18 - adding the extra 'order
by', ensures that my pinned post appears first, meanwhile all the other
posts are still ordered by published date beneath it. Thoughts?

Miguel Jacq (1):
  Ensure pinned posts appear on front page before others

 app/main.py | 1 +
 1 file changed, 1 insertion(+)

-- 
2.34.4
#835255 .build.yml success
microblog.pub/patches/.build.yml: SUCCESS in 4m38s

[Order by is_pinned before published date][0] from [~mig5][1]

[0]: https://lists.sr.ht/~tsileo/microblog.pub-devel/patches/35039
[1]: mailto:mig@mig5.net

✓ #835255 SUCCESS microblog.pub/patches/.build.yml https://builds.sr.ht/~tsileo/job/835255
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~tsileo/microblog.pub-devel/patches/35039/mbox | git am -3
Learn more about email & git

[PATCH microblog.pub 1/1] Ensure pinned posts appear on front page before others Export this patch

From: Miguel Jacq <mig@mig5.net>

---
 app/main.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/main.py b/app/main.py
index e29f2f3..fe4f9ec 100644
--- a/app/main.py
+++ b/app/main.py
@@ -281,6 +281,7 @@ async def index(
                ),
            ),
        )
        .order_by(models.OutboxObject.is_pinned.desc())
        .order_by(models.OutboxObject.ap_published_at.desc())
        .offset(page_offset)
        .limit(page_size)
-- 
2.34.4
microblog.pub/patches/.build.yml: SUCCESS in 4m38s

[Order by is_pinned before published date][0] from [~mig5][1]

[0]: https://lists.sr.ht/~tsileo/microblog.pub-devel/patches/35039
[1]: mailto:mig@mig5.net

✓ #835255 SUCCESS microblog.pub/patches/.build.yml https://builds.sr.ht/~tsileo/job/835255