提交 8d847b89 编写于 作者: N Nihad Abbasov

API: fix commits pagination

closes #2300
上级 135418dc
......@@ -292,7 +292,7 @@ module Gitlab
authorize! :download_code, user_project
page = params[:page] || 0
per_page = params[:per_page] || 20
per_page = params[:per_page].to_i || 20
ref = params[:ref_name] || user_project.try(:default_branch) || 'master'
commits = user_project.repository.commits(ref, nil, per_page, page * per_page)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册