Commit e01c421b authored by Lin Jen-Shin's avatar Lin Jen-Shin

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

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