diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-09-19 16:34:32 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-09-19 16:34:32 +0200 |
commit | 3c1bb3432b0b8448262ec9a9a3468641c82db5c1 (patch) | |
tree | 0ee07fcff0db3ef3beb744d124efe80aa15373c8 /lib/api | |
parent | 135be3cabb01ca3c825829f18ede4e8720383d7b (diff) | |
download | gitlab-ce-3c1bb3432b0b8448262ec9a9a3468641c82db5c1.tar.gz |
Revert "Revert all changes introduced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6043"lfs-support
This reverts commit 6d43c95b7011ec7ec4600e00bdc8df76bb39813c.
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/internal.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb index 1114fd21784..090d04544da 100644 --- a/lib/api/internal.rb +++ b/lib/api/internal.rb @@ -82,6 +82,19 @@ module API response end + post "/lfs_authenticate" do + status 200 + + key = Key.find(params[:key_id]) + token_handler = Gitlab::LfsToken.new(key) + + { + username: token_handler.actor_name, + lfs_token: token_handler.generate, + repository_http_path: project.http_url_to_repo + } + end + get "/merge_request_urls" do ::MergeRequests::GetUrlsService.new(project).execute(params[:changes]) end |