Commit 66516da3 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 678f3ddd
...@@ -8,7 +8,7 @@ module API ...@@ -8,7 +8,7 @@ module API
case state case state
when 'opened' then issues.opened when 'opened' then issues.opened
when 'closed' then issues.closed when 'closed' then issues.closed
else issues.order('id DESC') else issues
end end
end end
...@@ -35,6 +35,7 @@ module API ...@@ -35,6 +35,7 @@ module API
issues = current_user.issues issues = current_user.issues
issues = filter_issues_state(issues, params[:state]) unless params[:state].nil? issues = filter_issues_state(issues, params[:state]) unless params[:state].nil?
issues = filter_issues_labels(issues, params[:labels]) unless params[:labels].nil? issues = filter_issues_labels(issues, params[:labels]) unless params[:labels].nil?
issues = issues.order('issues.id DESC')
present paginate(issues), with: Entities::Issue present paginate(issues), with: Entities::Issue
end end
...@@ -60,6 +61,7 @@ module API ...@@ -60,6 +61,7 @@ module API
issues = user_project.issues issues = user_project.issues
issues = filter_issues_state(issues, params[:state]) unless params[:state].nil? issues = filter_issues_state(issues, params[:state]) unless params[:state].nil?
issues = filter_issues_labels(issues, params[:labels]) unless params[:labels].nil? issues = filter_issues_labels(issues, params[:labels]) unless params[:labels].nil?
issues = issues.order('issues.id DESC')
present paginate(issues), with: Entities::Issue present paginate(issues), with: Entities::Issue
end 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