diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-03-24 13:15:59 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-03-31 12:52:20 +0200 |
commit | 2cfd0b59aeb410c1541530ca3eb5f5c472b978e0 (patch) | |
tree | 6456eb0d262036234c851dd516f3edd12cc0f833 /lib/api | |
parent | 33a8f53f7a8fdc40d0f0ee4245258c8dba99198a (diff) | |
download | gitlab-ce-2cfd0b59aeb410c1541530ca3eb5f5c472b978e0.tar.gz |
Archive repositories in background worker.
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/repositories.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/api/repositories.rb b/lib/api/repositories.rb index b259914a01c..1fbf3dca3c6 100644 --- a/lib/api/repositories.rb +++ b/lib/api/repositories.rb @@ -133,10 +133,11 @@ module API authorize! :download_code, user_project begin - file_path = ArchiveRepositoryService.new.execute( - user_project, - params[:sha], - params[:format]) + file_path = ArchiveRepositoryService.new( + user_project, + params[:sha], + params[:format] + ).execute rescue not_found!('File') end @@ -149,7 +150,7 @@ module API env['api.format'] = :binary present data else - not_found!('File') + redirect request.fullpath end end |