Skip to content

Commit

Permalink
[api] Remove duplicated code from request controller
Browse files Browse the repository at this point in the history
There already is a before_action that makes sure a bs_request was found.
The code is of the before_action is even identical to the dropped code.
  • Loading branch information
bgeuken committed Oct 9, 2017
1 parent 562172a commit edc93d8
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/api/app/controllers/webui/request_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,6 @@ def require_request
end

def changerequest
@req = BsRequest.find_by_number(params[:number])
unless @req
flash[:error] = "Can't find request #{params[:number]}"
redirect_back(fallback_location: user_show_path(User.current)) && return
end

changestate = nil
%w(accepted declined revoked new).each do |s|
if params.has_key? s
Expand Down

0 comments on commit edc93d8

Please sign in to comment.