    Rails.application.routes.draw do

      devise_for :users
      devise_scope :user do
      	# get "/" => "devise/sessions#new"
        
      resources :users do
      	resources :faqs do
      		resources :questions do
            member do
              put "like", to: "questions#upvote"
              put "dislike", to: "questions#downvote"
            end  
           end
        end
      end
      resources :comments
      resources :ratings
      
      
      root to: "users#show"


    end
  end

    Rails.application.routes.draw do

      get 'faqs/:id' => 'faqs#show_with_token'

      devise_for :users
      devise_scope :user do
      	# get "/" => "devise/sessions#new"
        
      resources :users do
      	resources :faqs do
      		resources :questions do
            member do
              put "like", to: "questions#upvote"
              put "dislike", to: "questions#downvote"
            end  
           end
        end
      end
      resources :comments
      resources :ratings
      
    end

    root to: "users#show"
  end

Add route to fetch FAQs based on id and token
Add route to fetch FAQs based on id and token

Also move the `root` directive out of the `devise_scope`.
