@ -18,4 +17,8 @@ class Api::V1::Emails::ConfirmationsController < Api::BaseController
defrequire_user_owned_by_application!
renderjson:{error:'This method is only available to the application the user originally signed-up with'},status::forbiddenunlesscurrent_user&¤t_user.created_by_application_id==doorkeeper_token.application_id
end
defrequire_user_not_confirmed!
renderjson:{error:'This method is only available while the e-mail is awaiting confirmation'},status::forbiddenifcurrent_user.confirmed?||current_user.unconfirmed_email.blank?