DEV: Remove unused routes

This commit is contained in:
Gerhard Schlager
2020-06-05 18:42:12 +02:00
parent 8c6a42c589
commit 0bf753a739
5 changed files with 3 additions and 57 deletions

View File

@@ -4,11 +4,6 @@ class EmailController < ApplicationController
layout 'no_ember'
skip_before_action :check_xhr, :preload_json, :redirect_to_login_if_required
before_action :ensure_logged_in, only: :preferences_redirect
def preferences_redirect
redirect_to path("/u/#{current_user.encoded_username}/preferences/emails")
end
def unsubscribe
@not_found = true

View File

@@ -4,7 +4,7 @@ class UsersController < ApplicationController
skip_before_action :authorize_mini_profiler, only: [:avatar]
requires_login only: [
:username, :update, :user_preferences_redirect, :upload_user_image,
:username, :update, :upload_user_image,
:pick_avatar, :destroy_user_image, :destroy, :check_emails,
:topic_tracking_state, :preferences, :create_second_factor_totp,
:enable_second_factor_totp, :disable_second_factor, :list_second_factors,
@@ -16,7 +16,7 @@ class UsersController < ApplicationController
skip_before_action :check_xhr, only: [
:show, :badges, :password_reset_show, :password_reset_update, :update, :account_created,
:activate_account, :perform_account_activation, :user_preferences_redirect, :avatar,
:activate_account, :perform_account_activation, :avatar,
:my_redirect, :toggle_anon, :admin_login, :confirm_admin, :email_login, :summary,
:feature_topic, :clear_featured_topic, :bookmarks
]
@@ -129,10 +129,6 @@ class UsersController < ApplicationController
show
end
def user_preferences_redirect
redirect_to path("/u/#{current_user.encoded_username}/preferences")
end
def update
user = fetch_user_from_params
guardian.ensure_can_edit!(user)