routes.rb 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. Huginn::Application.routes.draw do
  2. resources :agents do
  3. member do
  4. post :run
  5. post :handle_details_post
  6. put :leave_scenario
  7. delete :remove_events
  8. end
  9. collection do
  10. post :propagate
  11. get :type_details
  12. get :event_descriptions
  13. end
  14. resources :logs, :only => [:index] do
  15. collection do
  16. delete :clear
  17. end
  18. end
  19. resources :events, :only => [:index]
  20. end
  21. resource :diagram, :only => [:show]
  22. resources :events, :only => [:index, :show, :destroy] do
  23. member do
  24. post :reemit
  25. end
  26. end
  27. resources :scenarios do
  28. collection do
  29. resource :scenario_imports, :only => [:new, :create]
  30. end
  31. member do
  32. get :share
  33. get :export
  34. end
  35. resource :diagram, :only => [:show]
  36. end
  37. resources :user_credentials, :except => :show
  38. resources :services, :only => [:index, :destroy] do
  39. member do
  40. post :toggle_availability
  41. end
  42. end
  43. resources :jobs, :only => [:index, :destroy] do
  44. member do
  45. put :run
  46. end
  47. collection do
  48. delete :destroy_failed
  49. end
  50. end
  51. get "/worker_status" => "worker_status#show"
  52. match "/users/:user_id/web_requests/:agent_id/:secret" => "web_requests#handle_request", :as => :web_requests, :via => [:get, :post, :put, :delete]
  53. post "/users/:user_id/webhooks/:agent_id/:secret" => "web_requests#handle_request" # legacy
  54. post "/users/:user_id/update_location/:secret" => "web_requests#update_location" # legacy
  55. devise_for :users, :sign_out_via => [ :post, :delete ]
  56. get '/auth/:provider/callback', to: 'services#callback'
  57. get "/about" => "home#about"
  58. root :to => "home#index"
  59. end