Commit cf9a366e22f731118b19de8a9922fb8df20e86a3

Authored by Dmitriy Zaporozhets
1 parent 883f465a

API: Fix repository commits pagination

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/api/repositories.rb
@@ -94,7 +94,7 @@ module API @@ -94,7 +94,7 @@ module API
94 get ":id/repository/commits" do 94 get ":id/repository/commits" do
95 authorize! :download_code, user_project 95 authorize! :download_code, user_project
96 96
97 - page = params[:page] || 0 97 + page = (params[:page] || 0).to_i
98 per_page = (params[:per_page] || 20).to_i 98 per_page = (params[:per_page] || 20).to_i
99 ref = params[:ref_name] || user_project.try(:default_branch) || 'master' 99 ref = params[:ref_name] || user_project.try(:default_branch) || 'master'
100 100