Sha256: edf7905180c65efcf2c95b60a44f2a830bdc3db1af7951df1eb172dce5e93968

Contents?: true

Size: 499 Bytes

Versions: 2

Compression:

Stored size: 499 Bytes

Contents

People::Engine.routes.draw do

	root to: "users#index"

	<% if !options.active_admin? %>
  scope 'admin' do
	  resources :users
	end
	<% 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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
json_voorhees-0.3.6 lib/generators/json_voorhees/app_make_user/templates/user/user_routes.rb
json_voorhees-0.3.5 lib/generators/json_voorhees/app_make_user/templates/user/user_routes.rb