Skip to content

Commit

Permalink
add users#request_reconfirmation route
Browse files Browse the repository at this point in the history
  • Loading branch information
data-doge committed Apr 19, 2016
1 parent 7343ea0 commit 6c14142
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ def create
end
end

api :POST, '/users/request_reconfirmation'
def request_reconfirmation
current_user.generate_confirmation_token! unless current_user.confirmed?
UserMailer.confirm_account_email(user: current_user).deliver_later
render nothing: true
end

api :POST, '/users/update_profile'
def update_profile
current_user.update(user_params)
Expand Down
3 changes: 2 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
post :update_profile
post :update_password
get :me
post :request_reconfirmation
end
end

Expand Down Expand Up @@ -53,7 +54,7 @@
post :update_email_settings
end
end

get '/analytics/report', to: 'analytics#report'
end

Expand Down

0 comments on commit 6c14142

Please sign in to comment.