diff --git a/app/controllers/session_controller.rb b/app/controllers/session_controller.rb index babdf8826da..7a05b6b943e 100644 --- a/app/controllers/session_controller.rb +++ b/app/controllers/session_controller.rb @@ -36,11 +36,6 @@ class SessionController < ApplicationController render :json => {error: I18n.t("login.incorrect_username_email_or_password")} end - # Retrieve information about the site and session - def index - render_serialized(DiscourseSession.new, DiscourseSessionSerializer) - end - def forgot_password requires_parameter(:username) diff --git a/config/routes.rb b/config/routes.rb index 746aa06690f..1170701d4ec 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -62,7 +62,7 @@ Discourse::Application.routes.draw do post 'email/resubscribe/:key' => 'email#resubscribe', as: 'email_resubscribe' - resources :session, id: USERNAME_ROUTE_FORMAT do + resources :session, id: USERNAME_ROUTE_FORMAT, :only => [:create, :destroy] do collection do post 'forgot_password' end