diff options
Diffstat (limited to 'app/controllers/projects/network_controller.rb')
-rw-r--r-- | app/controllers/projects/network_controller.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/projects/network_controller.rb b/app/controllers/projects/network_controller.rb index ad2466a8588..6543711ecfa 100644 --- a/app/controllers/projects/network_controller.rb +++ b/app/controllers/projects/network_controller.rb @@ -8,6 +8,7 @@ class Projects::NetworkController < Projects::ApplicationController before_action :require_non_empty_project before_action :assign_ref_vars before_action :authorize_download_code! + before_action :assign_options before_action :assign_commit def show @@ -29,10 +30,13 @@ class Projects::NetworkController < Projects::ApplicationController render end + def assign_options + @options = params.permit(:filter_ref, :extended_sha1) + end + def assign_commit - return if params[:extended_sha1].blank? + return if @options[:extended_sha1].blank? - @options[:extended_sha1] = params[:extended_sha1] @commit = @repo.commit(@options[:extended_sha1]) end |