BigW Consortium Gitlab

Explicit issues order in API. Fixes tests for mysql. Again :)

parent 678f3ddd
......@@ -8,7 +8,7 @@ module API
case state
when 'opened' then issues.opened
when 'closed' then issues.closed
else issues.order('id DESC')
else issues
end
end
......@@ -35,6 +35,7 @@ module API
issues = current_user.issues
issues = filter_issues_state(issues, params[:state]) unless params[:state].nil?
issues = filter_issues_labels(issues, params[:labels]) unless params[:labels].nil?
issues = issues.order('issues.id DESC')
present paginate(issues), with: Entities::Issue
end
......@@ -60,6 +61,7 @@ module API
issues = user_project.issues
issues = filter_issues_state(issues, params[:state]) unless params[:state].nil?
issues = filter_issues_labels(issues, params[:labels]) unless params[:labels].nil?
issues = issues.order('issues.id DESC')
present paginate(issues), with: Entities::Issue
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment