skill-assessment-app/config/routes.rb
2016-08-24 15:02:32 -05:00

75 lines
4.7 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/reset/:reset_token", to: "admin/auth#reset", as: :admin_reset
post "/admin/reset", to: "admin/auth#reset_password", as: :admin_reset_password
get "/admin/reset_request", to: "admin/auth#reset_request", as: :admin_reset_request
post "/admin/reset_request", to: "admin/auth#send_reset", as: :admin_send_reset
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/new", 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/edit", to: "admin/quiz#update", as: :admin_update_quiz
patch "/admin/quiz/:quiz_id/edit", to: "admin/quiz#update"
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/new", 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/edit", to: "admin/user#update", as: :admin_update_user
patch "/admin/user/:user_id/edit", to: "admin/user#update"
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/new", to: "admin/question#create", as: :admin_create_question
get "/admin/question(/:question_id)/options/:input_type", to: "admin/question#options", as: :admin_question_option_form
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/edit", to: "admin/question#update", as: :admin_update_question
patch "/admin/question/:question_id/edit", to: "admin/question#update"
get "/admin/profile", to: "admin/profile#view", as: :admin_profile
post "/admin/profile", to: "admin/profile#update", as: :admin_update_profile
get "/admin/profile/edit", to: "admin/profile#edit", as: :admin_edit_profile
get "/admin", to: "admin#dashboard", as: :admin
#########################################################################################
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
get "/styleguide", to: "application#styleguide", as: :styleguide
root to: "candidate#login"
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end