2015-09-07 11:44:48 +02:00
|
|
|
Rails.application.routes.draw do
|
2015-09-08 13:34:29 +02:00
|
|
|
devise_for :users, controllers: {
|
|
|
|
omniauth_callbacks: 'callbacks'
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
2015-09-11 13:16:53 +02:00
|
|
|
resources :transactions, only: [:index, :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
|
2017-01-09 15:46:43 +01:00
|
|
|
end
|
2015-09-17 16:46:33 +02:00
|
|
|
|
|
|
|
get 'datatables/:id' => 'datatables#transactions_for_user', as: "user_transactions"
|
2015-09-07 11:44:48 +02:00
|
|
|
end
|