Rails.application.routes.draw do
  resources :addresses
  resources :orders
  resources :order_items
  resources :products
  root to: "products#index"
 # get '/auth/:provider/callback', to: 'sessions#create'
  match '/auth/:provider/callback', to: 'sessions#create', via: :get
  match '/login'=> redirect("/auth/twitter"), as: :login, via: :get
  match '/logout' => "sessions#destroy", as: :logout, via: :get
  # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end
