diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 68177bd12..d9b35f236 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -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) diff --git a/config/routes.rb b/config/routes.rb index baaf4eb18..205d4d77f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -14,6 +14,7 @@ post :update_profile post :update_password get :me + post :request_reconfirmation end end @@ -53,7 +54,7 @@ post :update_email_settings end end - + get '/analytics/report', to: 'analytics#report' end