People::Engine.routes.draw do root to: "users#index" scope 'admin' do resources :users end scope 'api' do scope '1' do resources :users, controller: 'api/v1/users' do collection do # /api/1/users/register post 'register', to: "api/v1/users#register" # /api/1/users/login post 'login', to: "api/v1/users#login" # /api/1/users/logout get 'logout', to: "api/v1/users#logout" end end end end end