Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorRoger Rüttimann <roger.ruettimann@gmail.com>2018-04-13 11:06:04 +0300
committerDouwe Maan <douwe@gitlab.com>2018-04-13 11:06:04 +0300
commite467a11ec75386b2674a75222208ec1f97a7d992 (patch)
tree30d5ff5325b46774fde0c1eb400ec1cb29bd1ce7 /lib/api
parent70083ebf6da6f4a84fdcf5cc229d3b7f6d468948 (diff)
Feature/add language in repository to api
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/projects.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index d0a4a23e074..3ae6fbd1fa9 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -338,6 +338,11 @@ module API
end
end
+ desc 'Get languages in project repository'
+ get ':id/languages' do
+ user_project.repository.languages.map { |language| language.values_at(:label, :value) }.to_h
+ end
+
desc 'Remove a project'
delete ":id" do
authorize! :remove_project, user_project