summaryrefslogtreecommitdiff
path: root/lib/api/issues.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/issues.rb')
-rw-r--r--lib/api/issues.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/api/issues.rb b/lib/api/issues.rb
index 1694a967f26..0e5b0fae6e2 100644
--- a/lib/api/issues.rb
+++ b/lib/api/issues.rb
@@ -114,6 +114,19 @@ module API
present issues, options
end
+
+ desc "Get specified issue (admin only)" do
+ success Entities::Issue
+ end
+ params do
+ requires :id, type: String, desc: 'The ID of the Issue'
+ end
+ get ":id" do
+ authenticated_as_admin!
+ issue = Issue.find(params['id'])
+
+ present issue, with: Entities::Issue, current_user: current_user, project: issue.project
+ end
end
params do