summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index dad783f..5f4bfcf 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -9,7 +9,9 @@ module API
# Example Request:
# GET /projects
get do
- gitlab_projects = Project.from_gitlab(current_user, nil, nil, :authorized)
+ gitlab_projects = Project.from_gitlab(
+ current_user, params[:page], params[:per_page], :authorized
+ )
ids = gitlab_projects.map { |project| project.id }
projects = Project.where("gitlab_id IN (?)", ids).load
@@ -21,7 +23,9 @@ module API
# Example Request:
# GET /projects/owned
get "owned" do
- gitlab_projects = Project.from_gitlab(current_user, nil, nil, :owned)
+ gitlab_projects = Project.from_gitlab(
+ current_user, params[:page], params[:per_page], :owned
+ )
ids = gitlab_projects.map { |project| project.id }
projects = Project.where("gitlab_id IN (?)", ids).load