BigW Consortium Gitlab

Commit e01c421b by Lin Jen-Shin

Prefer if so it's more clear what's going on

parent 1c7871e9
......@@ -69,16 +69,17 @@ module API
authorize_read_builds!
build = get_build!(params[:build_id])
artifacts_file = build.artifacts_file
unless artifacts_file.file_storage?
return redirect_to build.artifacts_file.url
end
if !artifacts_file.file_storage?
redirect_to(build.artifacts_file.url)
return not_found! unless artifacts_file.exists?
elsif artifacts_file.exists?
present_file!(artifacts_file.path, artifacts_file.filename)
present_file!(artifacts_file.path, artifacts_file.filename)
else
not_found!
end
end
# Get a trace of a specific build of a project
......
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