2015-09-07 11:44:48 +02:00
|
|
|
Rails.application.routes.draw do
|
2018-03-21 19:40:03 +01:00
|
|
|
devise_for :users, controllers: {
|
|
|
|
omniauth_callbacks: 'callbacks'
|
|
|
|
}
|
2015-09-08 13:34:29 +02:00
|
|
|
|
2017-01-16 21:40:09 +01:00
|
|
|
devise_scope :user do
|
|
|
|
delete '/sign_out', to: 'devise/sessions#destroy'
|
|
|
|
end
|
|
|
|
|
2017-01-11 21:18:23 +01:00
|
|
|
authenticated :user do
|
|
|
|
root 'pages#landing', as: :authenticated_root
|
|
|
|
end
|
|
|
|
|
2017-01-14 16:22:44 +01:00
|
|
|
root to: 'pages#sign_in_page'
|
2015-09-08 15:16:08 +02:00
|
|
|
|
2019-04-10 14:15:20 +02:00
|
|
|
resources :transactions, only: [:create]
|
2017-01-09 15:46:43 +01:00
|
|
|
resources :users, only: [:index, :show] do
|
2017-01-09 16:22:58 +01:00
|
|
|
resources :requests, only: [:index], shallow: true do
|
2017-01-09 15:46:43 +01:00
|
|
|
post :confirm
|
|
|
|
post :decline
|
|
|
|
end
|
2017-01-09 16:22:58 +01:00
|
|
|
resources :notifications, only: [:index], shallow: true do
|
|
|
|
post :read
|
|
|
|
end
|
2019-04-10 14:15:20 +02:00
|
|
|
resources :transactions, only: [:index], shallow: true
|
2018-06-20 19:28:01 +02:00
|
|
|
post :reset_key, on: :member
|
2019-05-08 22:28:09 +02:00
|
|
|
post :add_registration_token, on: :member
|
2017-01-09 15:46:43 +01:00
|
|
|
end
|
2015-09-17 16:46:33 +02:00
|
|
|
|
2019-04-10 14:15:20 +02:00
|
|
|
get 'datatables/:id' => 'datatables#transactions_for_user', as: "user_transactions_datatable"
|
2015-09-07 11:44:48 +02:00
|
|
|
end
|