refactor code based on feedback

This commit is contained in:
James Lopez 2018-02-14 14:59:11 +01:00
parent 2dc2bad623
commit 0abd85f919
No known key found for this signature in database
GPG key ID: 756BF8E9D7C0CF39

View file

@ -31,7 +31,7 @@ module API
success Entities::ProjectImportStatus
end
post 'import' do
render_api_error!('The file is invalid', 400) unless file_is_valid?
validate_file!
Gitlab::QueryLimiting.whitelist('https://gitlab.com/gitlab-org/gitlab-ce/issues/42437')