skill-assessment-app/config/routes.rb
2016-08-22 16:26:21 -05:00

61 lines
3.8 KiB
Ruby

Rails.application.routes.draw do
post "/admin/login", to: "admin/auth#auth", as: :admin_auth
get "/admin/login", to: "admin/auth#login", as: :admin_login
get "/admin/logout", to: "admin/auth#logout", as: :admin_logout
get "/admin", to: "admin#dashboard", as: :admin
get "/admin/quizzes", to: "admin/quiz#index", as: :admin_quizzes
get "/admin/quiz/new", to: "admin/quiz#new", as: :admin_new_quiz
post "/admin/quiz/create", to: "admin/quiz#create", as: :admin_create_quiz
get "/admin/quiz/:quiz_id", to: "admin/quiz#view", as: :admin_quiz
get "/admin/quiz/:quiz_id/edit", to: "admin/quiz#edit", as: :admin_edit_quiz
post "/admin/quiz/:quiz_id/update", to: "admin/quiz#update", as: :admin_update_quiz
get "/admin/users", to: "admin/user#index", as: :admin_users
get "/admin/user/new", to: "admin/user#new", as: :admin_new_user
post "/admin/user/create", to: "admin/user#create", as: :admin_create_user
get "/admin/user/:user_id", to: "admin/user#view", as: :admin_user
get "/admin/user/:user_id/edit", to: "admin/user#edit", as: :admin_edit_user
post "/admin/user/:user_id/update", to: "admin/user#update", as: :admin_update_user
get "/admin/questions", to: "admin/question#index", as: :admin_questions
get "/admin/question/new", to: "admin/question#new", as: :admin_new_question
post "/admin/question/create", to: "admin/question#create", as: :admin_create_question
get "/admin/question/:question_id", to: "admin/question#view", as: :admin_question
get "/admin/question/:question_id/edit", to: "admin/question#edit", as: :admin_edit_question
post "/admin/question/:question_id/update", to: "admin/question#update", as: :admin_update_question
#########################################################################################
post "/validate", to: "candidate#validate", as: :validate_candidate
get "/login(/:test_id)", to: "candidate#login", as: :login
get "/welcome", to: "candidate#welcome", as: :welcome
get "/saved", to: "candidate#saved", as: :saved
get "/thankyou", to: "candidate#thankyou", as: :thankyou
get "/oops", to: "candidate#oops", as: :oops
post "/question(/:answer_id)", to: "quiz#update_answer", as: :post_answer
get "/question(/:question_id)", to: "quiz#question", as: :question
post "/summary", to: "quiz#submit_summary", as: :post_summary
get "/summary", to: "quiz#summary", as: :summary
get "/review/logout", to: "review#logout", as: :review_logout
post "/review/login", to: "review#auth", as: :review_auth
get "/review/login", to: "review#login", as: :review_login
get "/review", to: "review#index", as: :review
get "/review/:test_hash", to: "review#view", as: :review_test
get "/recruiter", to: "recruiter#index", as: :recruiter
get "/recruiter/new-candidate", to: "recruiter#new", as: :new_candidate
post "/recruiter/new-candidate", to: "recruiter#create", as: :create_candidate
get "/recruiter/logout", to: "recruiter#logout", as: :recruiter_logout
get "/recruiter/login", to: "recruiter#login", as: :recruiter_login
post "/recruiter/login", to: "recruiter#auth", as: :recruiter_auth
root to: "candidate#login"
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end