Explicit issues order in API. Fixes tests for mysql. Again :)
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
678f3ddd6b
commit
66516da3c1
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue