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
e1531b35
Commit
e1531b35
authored
Jan 31, 2020
by
Rajendra Kadam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add patch method for enabling and disabling error tracking setting
parent
1e82af42
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
lib/api/error_tracking.rb
lib/api/error_tracking.rb
+23
-0
No files found.
lib/api/error_tracking.rb
View file @
e1531b35
...
@@ -23,6 +23,29 @@ module API
...
@@ -23,6 +23,29 @@ module API
present
setting
,
with:
Entities
::
ErrorTracking
::
ProjectSetting
present
setting
,
with:
Entities
::
ErrorTracking
::
ProjectSetting
end
end
desc
'Enable/Disable error tracking settings for the project'
do
detail
'This feature was introduced in GitLab 12.8.'
success
Entities
::
ErrorTracking
::
ProjectSetting
end
params
do
requires
:active
,
type:
Boolean
,
desc:
'Specifying whether to enable or disable error tracking settings'
end
patch
':id/error_tracking/settings/'
do
authorize!
:admin_operations
,
user_project
setting
=
user_project
.
error_tracking_setting
not_found!
(
'Error Tracking Setting'
)
unless
setting
update_params
=
{
error_tracking_setting_attributes:
{
enabled:
params
[
:active
]
}
}
result
=
::
Projects
::
Operations
::
UpdateService
.
new
(
user_project
,
current_user
,
update_params
).
execute
present
result
,
with:
Entities
::
ErrorTracking
::
ProjectSetting
end
end
end
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