BigW Consortium Gitlab

Commit 46fd485c by Kamil Trzcinski

Fix API implementation

parent 55701d9c
......@@ -79,9 +79,7 @@ module API
return redirect_to build.artifacts_file.url
end
unless artifacts_file.exists?
not_found!
end
return not_found! unless artifacts_file.exists?
present_file!(artifacts_file.path, artifacts_file.filename)
end
......
......@@ -406,7 +406,7 @@ module API
repo_obj.artifacts_download_url
end
end
expose :artifacts_file, using: BuildArtifactFile, if: lambda { |build, opts| build.artifacts? }
expose :artifacts_file, using: BuildArtifactFile, if: -> (build, opts) { build.artifacts? }
expose :commit, with: RepoCommit do |repo_obj, _options|
if repo_obj.respond_to?(:commit)
repo_obj.commit.commit_data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment