Sha256: e9c658c5d8d510ab3255644c083b9e2edc7f490a82b63e41602dbaca7bc649dd

Contents?: true

Size: 724 Bytes

Versions: 7

Compression:

Stored size: 724 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
	  		<% if options.arcadex? %>
				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
					post 'logout', to: "api/v1/users#logout"
					# /api/1/users/logout
					post 'authenticate/:id', to: "api/v1/users#authenticate"
					# /api/1/users/login_status
					get 'login_status', to: "api/v1/users#login_status"
				end
				<% end %>
	  	end
		end
	end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
json_voorhees-1.0.0 lib/generators/json_voorhees/app_make_user/templates/user/user_routes.rb
json_voorhees-0.5.5 lib/generators/json_voorhees/app_make_user/templates/user/user_routes.rb
json_voorhees-0.5.4 lib/generators/json_voorhees/app_make_user/templates/user/user_routes.rb
json_voorhees-0.5.3 lib/generators/json_voorhees/app_make_user/templates/user/user_routes.rb
json_voorhees-0.5.2 lib/generators/json_voorhees/app_make_user/templates/user/user_routes.rb
json_voorhees-0.5.1 lib/generators/json_voorhees/app_make_user/templates/user/user_routes.rb
json_voorhees-0.5.0 lib/generators/json_voorhees/app_make_user/templates/user/user_routes.rb