docker_manager/config/routes.rb
Vinoth Kannan da4917770d
DEV: rename the "upgrade" route to "update" and change references. (#210)
This PR will rename the route "`/admin/upgrade`" to "`/admin/update`" and it will add a redirect for the old route.

Follow-up to the PR: https://github.com/discourse/docker_manager/pull/208
2024-04-03 21:10:13 +05:30

17 lines
581 B
Ruby

# frozen_string_literal: true
DockerManager::Engine.routes.draw do
scope "/admin", constraints: AdminConstraint.new do
get "/upgrade", to: redirect("/admin/update")
get "/upgrade/:id", to: redirect("/admin/update/%{id}")
get "/update" => "admin#index"
get "/update/:id" => "admin#index"
get "/docker/repos" => "admin#repos"
get "/docker/latest" => "admin#latest"
get "/docker/progress" => "admin#progress"
get "/docker/ps" => "admin#ps"
post "/docker/update" => "admin#upgrade"
delete "/docker/update" => "admin#reset_upgrade"
end
end