API: Fix repository commits pagination

This commit is contained in:
Dmitriy Zaporozhets
2013-06-06 16:16:49 +03:00
parent 883f465abe
commit cf9a366e22
+1 -1
View File
@@ -94,7 +94,7 @@ module API
get ":id/repository/commits" do
authorize! :download_code, user_project
page = params[:page] || 0
page = (params[:page] || 0).to_i
per_page = (params[:per_page] || 20).to_i
ref = params[:ref_name] || user_project.try(:default_branch) || 'master'