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
6feda454
Commit
6feda454
authored
Jan 07, 2020
by
Giorgenes Gelatti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates package list api with destroy url
Adds `delete_api_path` to the packages list api
parent
3e2feecf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
ee/lib/api/project_packages.rb
ee/lib/api/project_packages.rb
+1
-1
ee/spec/requests/api/project_packages_spec.rb
ee/spec/requests/api/project_packages_spec.rb
+12
-0
No files found.
ee/lib/api/project_packages.rb
View file @
6feda454
...
...
@@ -24,7 +24,7 @@ module API
get
':id/packages'
do
packages
=
user_project
.
packages
present
paginate
(
packages
),
with:
EE
::
API
::
Entities
::
Package
present
paginate
(
packages
),
with:
EE
::
API
::
Entities
::
Package
,
user:
current_user
end
desc
'Get a single project package'
do
...
...
ee/spec/requests/api/project_packages_spec.rb
View file @
6feda454
...
...
@@ -41,6 +41,18 @@ describe API::ProjectPackages do
it_behaves_like
'returns packages'
,
:project
,
:reporter
it_behaves_like
'rejects packages access'
,
:project
,
:no_type
,
:not_found
it_behaves_like
'rejects packages access'
,
:project
,
:guest
,
:forbidden
context
'user is a maintainer'
do
before
do
project
.
add_maintainer
(
user
)
end
it
'returns the destroy url'
do
subject
expect
(
json_response
.
first
[
'_links'
]).
to
include
(
'delete_api_path'
)
end
end
end
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