Skip to content

Commit

Permalink
consent: Set fetch order to descending
Browse files Browse the repository at this point in the history
Signed-off-by: arekkas <aeneas@ory.am>
  • Loading branch information
arekkas committed Oct 25, 2018
1 parent 0df90c8 commit 12b038c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions consent/manager_sql.go
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 12b038c

Please sign in to comment.