routes.rb 349 Bytes
Newer Older
1
# Registers all routes for the app.
Zac Wood's avatar
Zac Wood committed
2
Rails.application.routes.draw do
3
  scope :api do # Register /api routes
4
5
    resources :courses, only: [:index, :show]
    resources :course_sections, only: [:index]
6
    resources :schedules, only: [:index]
Zac Wood's avatar
Zac Wood committed
7
8
  end

Zac Wood's avatar
Zac Wood committed
9
10
  apipie # sets up API docs
  get '/', to: redirect('/api') # redirect the root url to API docs
Zac Wood's avatar
Zac Wood committed
11
end