DEV: restore custom route for custom homepage (#29343)

This commit is contained in:
Penar Musaraj 2024-10-22 13:17:36 -04:00 committed by GitHub
parent b2167f7651
commit cbdab52056
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View File

@ -20,4 +20,9 @@ class AuthProviderSerializer < ApplicationSerializer
return SiteSetting.get(object.pretty_name_setting) if object.pretty_name_setting return SiteSetting.get(object.pretty_name_setting) if object.pretty_name_setting
object.pretty_name object.pretty_name
end end
def custom_url
# ensures that the "/custom" route doesn't trigger the magic custom_url helper in ActionDispatch
object.custom_url
end
end end

View File

@ -1615,6 +1615,8 @@ Discourse::Application.routes.draw do
constraints: HomePageConstraint.new("custom"), constraints: HomePageConstraint.new("custom"),
as: "custom_index" as: "custom_index"
get "/custom" => "custom_homepage#index"
get "/user-api-key/new" => "user_api_keys#new" get "/user-api-key/new" => "user_api_keys#new"
post "/user-api-key" => "user_api_keys#create" post "/user-api-key" => "user_api_keys#create"
post "/user-api-key/revoke" => "user_api_keys#revoke" post "/user-api-key/revoke" => "user_api_keys#revoke"