Rails.application.routes.draw do
  devise_for :users
  # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
  root 'home#index'

  resources :dashboard, only: :index
  resources :books, only: :index

  get 'borrow/:id', to: "check_outs#borrow", as: :borrow
  get 'returns/:id', to: "check_outs#returns", as: :returns

  namespace :admin do
    resources :books
  end

end
