DEV: endpoint to reset community community-section (#21664)

In upcoming PRs, admins will be able to edit the Community section. We need an endpoint which allows resetting it to the default state.
This commit is contained in:
Krzysztof Kotlarek
2023-05-23 09:53:32 +10:00
committed by GitHub
parent 984a616204
commit 7ead8de232
7 changed files with 148 additions and 14 deletions

View File

@@ -1594,6 +1594,7 @@ Discourse::Application.routes.draw do
resources :sidebar_sections, only: %i[index create update destroy]
post "/sidebar_sections/reorder" => "sidebar_sections#reorder"
put "/sidebar_sections/reset/:id" => "sidebar_sections#reset"
get "*url", to: "permalinks#show", constraints: PermalinkConstraint.new
end