api/subscription: Fix QueryWithCursor

This commit is contained in:
Thorben Günther 2023-07-07 13:34:03 +02:00 committed by Drew DeVault
parent 4dfed3ddfc
commit d62bb5705f
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ func (si *SubscriptionInfo) QueryWithCursor(ctx context.Context, runner sq.BaseR
q = q.Where(database.WithAlias(si.alias, "id")+"<= ?", next)
}
q = q.
OrderBy(database.WithAlias(si.alias, "id")).
OrderBy(database.WithAlias(si.alias, "id") + " DESC").
Limit(uint64(cur.Count + 1))
if rows, err = q.RunWith(runner).QueryContext(ctx); err != nil {