Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

Refactor / Dashboard routes #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@

get 'ics/:key' => 'ics#show', as: :ics

get 'dashboard/:ecampus_id' => 'dashboard#index', as: :dashboard
get 'dashboard/:ecampus_id/courses' => 'dashboard#courses', as: :dashboard_courses
get 'dashboard/:ecampus_id/grades/:year/:try' => 'dashboard#grades', as: :dashboard_grades
put 'dashboard/:ecampus_id/grades/:year/:try' => 'dashboard#update_grades'
get 'dashboard/:ecampus_id/absences/:year/:try' => 'dashboard#absences', as: :dashboard_absences
put 'dashboard/:ecampus_id/absences/:year/:try' => 'dashboard#update_absences'
scope '/dashboard/:ecampus_id' do
get '' => 'dashboard#index', as: :dashboard
get 'courses' => 'dashboard#courses', as: :dashboard_courses
get 'grades/:year/:try' => 'dashboard#grades', as: :dashboard_grades
put 'grades/:year/:try' => 'dashboard#update_grades'
get 'absences/:year/:try' => 'dashboard#absences', as: :dashboard_absences
put 'absences/:year/:try' => 'dashboard#update_absences'
end

resource :sessions, only: [:destroy]
# Should be improved
Expand Down