fix: pinned posts not sorted to top + compose pulls GHCR image
- posts API: ORDER BY is_pinned DESC, pinned_at DESC NULLS LAST before sort (matches upstream) — pinned posts now appear first - docker-compose: app service pulls ghcr.io/lezi-fun/forumlify-deploy:next instead of local build (auto-rebuilt on push)
This commit is contained in:
1 parent
d265caa5bf
commit
7c6b816ac7
2 files changed
+4
-2
No files matched your search
@@ -36,7 +36,7 @@ export async function GET(req) {
|
||||
FROM posts p
|
||||
JOIN users u ON p.user_id = u.id
|
||||
${where}
|
||||
ORDER BY ${sort} DESC
|
||||
ORDER BY is_pinned DESC, pinned_at DESC NULLS LAST, ${sort} DESC
|
||||
LIMIT $${(await params).length + 1} OFFSET $${(await params).length + 2}
|
||||
`, [...params, limit, offset]);
|
||||
|
||||
|
||||
Reference in new issue
Block a user