Sprankelprachtig aan/afmeldsysteem

routes.rb 3.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. Rails.application.routes.draw do
  2. get 'dashboard/home'
  3. root to: 'dashboard#home'
  4. get 'settings', to: 'dashboard#settings', as: :settings
  5. post 'settings', to: 'dashboard#update_email_settings', as: :update_email_settings
  6. post 'update_password', to: 'dashboard#update_password', as: :update_password
  7. post 'logout_all', to: 'dashboard#logout_all_sessions', as: :logout_all
  8. get 'login', to: 'authentication#login_form', as: :login
  9. post 'login', to: 'authentication#login'
  10. get 'register', to: 'authentication#create_password_form'
  11. post 'register', to: 'authentication#create_password'
  12. get 'confirm', to: 'authentication#confirm_account_form'
  13. post 'confirm', to: 'authentication#confirm_account'
  14. get 'forgot', to: 'authentication#forgotten_password_form'
  15. post 'forgot', to: 'authentication#forgotten_password'
  16. get 'reset_password', to: 'authentication#reset_password_form'
  17. post 'reset_password', to: 'authentication#reset_password'
  18. get 'logout', to: 'authentication#logout_confirm'
  19. delete 'logout', to: 'authentication#logout'
  20. get 'people/mass_new', to: 'people#mass_new'
  21. post 'people/mass_new', to: 'people#mass_create'
  22. resources :people
  23. get 'c/:calendar_token', to: 'people#calendar', as: 'person_calendar'
  24. resources :groups do
  25. get 'invite', to: 'members#invite'
  26. post 'invite', to: 'members#process_invite'
  27. get 'mass_add', to: 'groups#mass_add_members'
  28. post 'mass_add', to: 'groups#process_mass_add_members'
  29. post 'subgroups', to: 'groups#create_default_subgroup', as: 'create_default_subgroup'
  30. patch 'subgroups/:default_subgroup_id', to: 'groups#update_default_subgroup', as: 'update_default_subgroup'
  31. delete 'subgroups(/:default_subgroup_id)', to: 'groups#destroy_default_subgroup', as: 'destroy_default_subgroup'
  32. resources :members do
  33. post 'promote', to: 'members#promote', on: :member
  34. post 'demote', to: 'members#demote', on: :member
  35. end
  36. get 'activities/mass_new', to: 'activities#mass_new'
  37. post 'activities/mass_new', to: 'activities#mass_create'
  38. resources :activities do
  39. post 'change_organizer', to: 'activities#change_organizer'
  40. put 'presence', to: 'activities#presence', on: :member
  41. patch 'presence', to: 'activities#presence', on: :member
  42. post 'subgroups', to: 'activities#create_subgroup', as: 'create_subgroup'
  43. patch 'subgroups/:subgroup_id', to: 'activities#update_subgroup', as: 'update_subgroup'
  44. delete 'subgroups(/:subgroup_id)', to: 'activities#destroy_subgroup', as: 'destroy_subgroup'
  45. get 'edit_subgroups', to: 'activities#edit_subgroups'
  46. post 'update_subgroups', to: 'activities#update_subgroups'
  47. post 'immediate_subgroups', to: 'activities#immediate_subgroups'
  48. post 'clear_subgroups', to: 'activities#clear_subgroups'
  49. end
  50. end
  51. get 'my_groups', to: 'groups#user_groups', as: :user_groups
  52. # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
  53. namespace 'api' do
  54. get 'status'
  55. scope 'me' do
  56. root to: 'me#index'
  57. get 'groups', to: 'me#groups'
  58. end
  59. resources :groups, only: [:index, :show] do
  60. get :current_activities, on: :member
  61. get :previous_activities, on: :member
  62. get :upcoming_activities, on: :member
  63. end
  64. resources :activities, only: [:index, :show] do
  65. get 'response_summary'
  66. put 'presence'
  67. patch 'presence'
  68. end
  69. get 'activities/:id/response_summary', to: 'activities#response_summary'
  70. resources :people, only: [:index, :show]
  71. end
  72. end