Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
bcbdd2e7
Commit
bcbdd2e7
authored
Apr 07, 2020
by
Sashi Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Filter necessary params to PackagesFinder from API
parent
c4030e8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
changelogs/unreleased/sk-project-packages-api-filter-necessary-params.yml
...eased/sk-project-packages-api-filter-necessary-params.yml
+5
-0
ee/lib/api/project_packages.rb
ee/lib/api/project_packages.rb
+4
-2
No files found.
changelogs/unreleased/sk-project-packages-api-filter-necessary-params.yml
0 → 100644
View file @
bcbdd2e7
---
title
:
Refactor projects/:id/packages API to supply only necessary params to PackagesFinder
merge_request
:
29052
author
:
Sashi Kumar
type
:
other
ee/lib/api/project_packages.rb
View file @
bcbdd2e7
...
...
@@ -30,8 +30,10 @@ module API
desc:
'Return packages with this name'
end
get
':id/packages'
do
packages
=
::
Packages
::
PackagesFinder
.
new
(
user_project
,
declared
(
params
)).
execute
packages
=
::
Packages
::
PackagesFinder
.
new
(
user_project
,
declared_params
.
slice
(
:order_by
,
:sort
,
:package_type
,
:package_name
)
).
execute
present
paginate
(
packages
),
with:
EE
::
API
::
Entities
::
Package
,
user:
current_user
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment