refactors lock tries [#279]
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
class Verification::SmsController < ApplicationController
|
||||
before_action :authenticate_user!
|
||||
before_action :verify_resident!
|
||||
before_action :verify_attemps_left!, only: [:new, :create]
|
||||
before_action :verify_lock, only: [:new, :create]
|
||||
before_action :set_phone, only: :create
|
||||
|
||||
skip_authorization_check
|
||||
@@ -68,10 +68,4 @@ class Verification::SmsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def verify_attemps_left!
|
||||
if current_user.sms_confirmation_tries >= 3
|
||||
redirect_to account_path, notice: t('verification.sms.alert.verify_attemps_left')
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user