From 56878b8bbe9083e38d19e9b29490c0555ea0a276 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Mon, 24 Jan 2022 15:39:32 -0800 Subject: [PATCH] Order followers --- db/query.sql | 2 +- db/query.sql.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/query.sql b/db/query.sql index 7aae2d51f..73cde27fc 100644 --- a/db/query.sql +++ b/db/query.sql @@ -9,7 +9,7 @@ SElECT count(*) FROM ap_followers WHERE approved_at is not null; SElECT count(*) FROM ap_outbox; -- name: GetFederationFollowersWithOffset :many -SELECT iri, inbox, name, username, image, created_at FROM ap_followers WHERE approved_at is not null LIMIT $1 OFFSET $2; +SELECT iri, inbox, name, username, image, created_at FROM ap_followers WHERE approved_at is not null ORDER BY created_at DESC LIMIT $1 OFFSET $2; -- name: GetRejectedAndBlockedFollowers :many SELECT iri, name, username, image, created_at, disabled_at FROM ap_followers WHERE disabled_at is not null; diff --git a/db/query.sql.go b/db/query.sql.go index 7cec05aa6..9350f69a8 100644 --- a/db/query.sql.go +++ b/db/query.sql.go @@ -153,7 +153,7 @@ func (q *Queries) GetFederationFollowerApprovalRequests(ctx context.Context) ([] } const getFederationFollowersWithOffset = `-- name: GetFederationFollowersWithOffset :many -SELECT iri, inbox, name, username, image, created_at FROM ap_followers WHERE approved_at is not null LIMIT $1 OFFSET $2 +SELECT iri, inbox, name, username, image, created_at FROM ap_followers WHERE approved_at is not null ORDER BY created_at DESC LIMIT $1 OFFSET $2 ` type GetFederationFollowersWithOffsetParams struct {