```ruby
Rails.application.routes.draw do

  root "dashboard#index"
  get "/auth/auth0/callback" => "auth0#callback"
  get "/auth/failure" => "auth0#failure"
  get   '/login', :to => 'sessions#new', :as => :login
  get   '/logout', :to => 'sessions#destroy', :as => :logout

  resources :timeslots, only: [:update, :show, :destroy]

  namespace :api, defaults: {format: :json} do
    resources :timeslots, only: [:index, :create, :update]
  end
end
```

Add named route for canceling a scheduled session
user
```ruby
Rails.application.routes.draw do

  root "dashboard#index"
  get "/auth/auth0/callback" => "auth0#callback"
  get "/auth/failure" => "auth0#failure"
  get   '/login', to: 'sessions#new', as: :login
  get   '/logout', to: 'sessions#destroy', as: :logout

  resources :timeslots, only: [:update, :show, :destroy]

  namespace :api, defaults: {format: :json} do
    patch 'timeslots/:id/cancel', to: 'timeslots#cancel', as: :cancel
    resources :timeslots, only: [:index, :create, :update]
  end
end
```
assistant