API: return status code 400 if filepath of raw file blob not given
This commit is contained in:
parent
fd01f3aacd
commit
54ab9bb6df
2 changed files with 8 additions and 1 deletions
|
@ -451,6 +451,8 @@ module Gitlab
|
|||
get ":id/repository/commits/:sha/blob" do
|
||||
authorize! :download_code, user_project
|
||||
|
||||
error!("Filepath must be specified", 400) if !params.has_key? :filepath
|
||||
|
||||
ref = params[:sha]
|
||||
|
||||
commit = user_project.repository.commit ref
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue