main
1Urkel::Application.routes.draw do
2 resources :sessions, only: [:new, :create, :destroy]
3 resources :videos, only: [:index, :create, :update, :destroy]
4 resources :services, only: [:index, :create, :update, :destroy]
5 resources :environments, only: [:index, :show, :create, :destroy]
6 resources :failures, only: [:index]
7
8 get 'dashboard', to: 'dashboard#index'
9
10 namespace :api do
11 namespace :v1 do
12 resources :failures, only: [:create]
13 end
14 end
15
16 root 'dashboard#index'
17
18 # The priority is based upon order of creation: first created -> highest priority.
19 # See how all your routes lay out with "rake routes".
20
21 # You can have the root of your site routed with "root"
22 # root 'welcome#index'
23
24 # Example of regular route:
25 # get 'products/:id' => 'catalog#view'
26
27 # Example of named route that can be invoked with purchase_url(id: product.id)
28 # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
29
30 # Example resource route (maps HTTP verbs to controller actions automatically):
31 # resources :products
32
33 # Example resource route with options:
34 # resources :products do
35 # member do
36 # get 'short'
37 # post 'toggle'
38 # end
39 #
40 # collection do
41 # get 'sold'
42 # end
43 # end
44
45 # Example resource route with sub-resources:
46 # resources :products do
47 # resources :comments, :sales
48 # resource :seller
49 # end
50
51 # Example resource route with more complex sub-resources:
52 # resources :products do
53 # resources :comments
54 # resources :sales do
55 # get 'recent', on: :collection
56 # end
57 # end
58
59 # Example resource route with concerns:
60 # concern :toggleable do
61 # post 'toggle'
62 # end
63 # resources :posts, concerns: :toggleable
64 # resources :photos, concerns: :toggleable
65
66 # Example resource route within a namespace:
67 # namespace :admin do
68 # # Directs /admin/products/* to Admin::ProductsController
69 # # (app/controllers/admin/products_controller.rb)
70 # resources :products
71 # end
72end