diff options
author | Roger Rüttimann <roger.ruettimann@gmail.com> | 2018-04-13 11:06:04 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-04-13 11:06:04 +0300 |
commit | e467a11ec75386b2674a75222208ec1f97a7d992 (patch) | |
tree | 30d5ff5325b46774fde0c1eb400ec1cb29bd1ce7 /lib/api/projects.rb | |
parent | 70083ebf6da6f4a84fdcf5cc229d3b7f6d468948 (diff) |
Feature/add language in repository to api
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r-- | lib/api/projects.rb | 5 |
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 |