consent: Set fetch order to descending
@@ -409,7 +409,7 @@ WHERE
r.subject=? AND r.client_id=? AND r.skip=FALSE
AND
(h.error='{}' AND h.remember=TRUE)
-ORDER BY h.requested_at
+ORDER BY h.requested_at DESC
LIMIT 1`), subject, client); err != nil {
if err == sql.ErrNoRows {
return nil, errors.WithStack(ErrNoPreviousConsentFound)
@@ -431,7 +431,7 @@ WHERE
r.subject=? AND r.skip=FALSE
AND
(h.error='{}' AND h.remember=TRUE)
-ORDER BY h.requested_at
+ORDER BY h.requested_at DESC
LIMIT ? OFFSET ?
`), subject, limit, offset); err != nil {
return nil, sqlcon.HandleError(err)
