Sprankelprachtig aan/afmeldsysteem

routes.rb 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. resources :groups do
  24. get 'invite', to: 'members#invite'
  25. post 'invite', to: 'members#process_invite'
  26. get 'mass_add', to: 'groups#mass_add_members'
  27. post 'mass_add', to: 'groups#process_mass_add_members'
  28. post 'subgroups', to: 'groups#create_default_subgroup', as: 'create_default_subgroup'
  29. patch 'subgroups/:default_subgroup_id', to: 'groups#update_default_subgroup', as: 'update_default_subgroup'
  30. delete 'subgroups(/:default_subgroup_id)', to: 'groups#destroy_default_subgroup', as: 'destroy_default_subgroup'
  31. resources :members do
  32. post 'promote', to: 'members#promote', on: :member
  33. post 'demote', to: 'members#demote', on: :member
  34. end
  35. get 'activities/mass_new', to: 'activities#mass_new'
  36. post 'activities/mass_new', to: 'activities#mass_create'
  37. resources :activities do
  38. post 'change_organizer', to: 'activities#change_organizer'
  39. put 'presence', to: 'activities#presence', on: :member
  40. patch 'presence', to: 'activities#presence', on: :member
  41. post 'subgroups', to: 'activities#create_subgroup', as: 'create_subgroup'
  42. patch 'subgroups/:subgroup_id', to: 'activities#update_subgroup', as: 'update_subgroup'
  43. delete 'subgroups(/:subgroup_id)', to: 'activities#destroy_subgroup', as: 'destroy_subgroup'
  44. get 'edit_subgroups', to: 'activities#edit_subgroups'
  45. post 'update_subgroups', to: 'activities#update_subgroups'
  46. post 'immediate_subgroups', to: 'activities#immediate_subgroups'
  47. post 'clear_subgroups', to: 'activities#clear_subgroups'
  48. end
  49. end
  50. get 'my_groups', to: 'groups#user_groups', as: :user_groups
  51. # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
  52. namespace 'api' do
  53. get 'status'
  54. scope 'me' do
  55. root to: 'me#index'
  56. get 'groups', to: 'me#groups'
  57. end
  58. resources :groups, only: [:index, :show]
  59. resources :activities, only: [:index, :show]
  60. get 'activities/:id/response_summary', to: 'activities#response_summary'
  61. resources :people, only: [:index, :show]
  62. end
  63. end