DEV: Fix Zeitwerk reloading error (#249)

Using `.append` can lead to a 'two routes with the same name' error

Reproduced via

```
rails runner 'Rails.application.reloader.reload!'
```
This commit is contained in:
David Taylor 2023-06-16 13:38:56 +01:00 committed by GitHub
parent 6b9bb24880
commit 7bf6c7d3a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ DiscourseDataExplorer::Engine.routes.draw do
end
end
Discourse::Application.routes.append do
Discourse::Application.routes.draw do
get "/g/:group_name/reports" => "discourse_data_explorer/query#group_reports_index"
get "/g/:group_name/reports/:id" => "discourse_data_explorer/query#group_reports_show"
post "/g/:group_name/reports/:id/run" => "discourse_data_explorer/query#group_reports_run"