Sprankelprachtig aan/afmeldsysteem

routes.rb 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. resources :members do
  29. post 'promote', to: 'members#promote', on: :member
  30. post 'demote', to: 'members#demote', on: :member
  31. end
  32. get 'activities/mass_new', to: 'activities#mass_new'
  33. post 'activities/mass_new', to: 'activities#mass_create'
  34. resources :activities do
  35. post 'change_organizer', to: 'activities#change_organizer'
  36. put 'presence', to: 'activities#presence', on: :member
  37. patch 'presence', to: 'activities#presence', on: :member
  38. end
  39. end
  40. get 'my_groups', to: 'groups#user_groups', as: :user_groups
  41. # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
  42. namespace 'api' do
  43. get 'status'
  44. scope 'me' do
  45. root to: 'me#index'
  46. get 'groups', to: 'me#groups'
  47. end
  48. resources :groups, only: [:index, :show]
  49. resources :activities, only: [:index, :show]
  50. get 'activities/:id/response_summary', to: 'activities#response_summary'
  51. resources :people, only: [:index, :show]
  52. end
  53. end