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
07c8855f
Commit
07c8855f
authored
Jul 14, 2020
by
Jonathan Schafer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove `after` block to clarify code
parent
df1aee14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
ee/lib/api/vulnerabilities.rb
ee/lib/api/vulnerabilities.rb
+4
-5
No files found.
ee/lib/api/vulnerabilities.rb
View file @
07c8855f
...
...
@@ -33,15 +33,11 @@ module API
@vulnerability
=
find_and_authorize_vulnerability!
(
:read_vulnerability
)
end
after
do
render_vulnerability
(
@vulnerability
)
end
desc
'Get a vulnerability'
do
success
EE
::
API
::
Entities
::
Vulnerability
end
get
':id'
do
# do nothing
render_vulnerability
(
@vulnerability
)
end
desc
'Resolve a vulnerability'
do
...
...
@@ -51,6 +47,7 @@ module API
not_modified!
if
@vulnerability
.
resolved?
@vulnerability
=
::
Vulnerabilities
::
ResolveService
.
new
(
current_user
,
@vulnerability
).
execute
render_vulnerability
(
@vulnerability
)
end
desc
'Dismiss a vulnerability'
do
...
...
@@ -60,6 +57,7 @@ module API
not_modified!
if
@vulnerability
.
dismissed?
@vulnerability
=
::
Vulnerabilities
::
DismissService
.
new
(
current_user
,
@vulnerability
).
execute
render_vulnerability
(
@vulnerability
)
end
desc
'Confirm a vulnerability'
do
...
...
@@ -69,6 +67,7 @@ module API
not_modified!
if
@vulnerability
.
confirmed?
@vulnerability
=
::
Vulnerabilities
::
ConfirmService
.
new
(
current_user
,
@vulnerability
).
execute
render_vulnerability
(
@vulnerability
)
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