FIX: `/u.json` should return 404 instead of 500.

This commit is contained in:
Guo Xiang Tan 2017-06-27 10:03:00 +09:00
parent cdf8baac3b
commit 117d5f1b6a
1 changed files with 3 additions and 1 deletions

View File

@ -309,7 +309,9 @@ Discourse::Application.routes.draw do
get "user_preferences" => "users#user_preferences_redirect"
%w{users u}.each_with_index do |root_path, index|
resources :users, except: [:new, :show, :update, :destroy], path: root_path do
get "#{root_path}" => "users#index", constraints: { format: 'html' }
resources :users, except: [:index, :new, :show, :update, :destroy], path: root_path do
collection do
get "check_username"
get "is_local_username"