routes.rb 351 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]
Zac Wood's avatar
Zac Wood committed
6

7
    post 'generate', controller: 'calendar_generator', action: 'new'
Zac Wood's avatar
Zac Wood committed
8 9
  end

Zac Wood's avatar
Zac Wood committed
10
  root 'courses#index' # Set the root to be the courses API endpoint
Zac Wood's avatar
Zac Wood committed
11
end