diff --git a/plugin.rb b/plugin.rb index 721eed7..57d21f8 100644 --- a/plugin.rb +++ b/plugin.rb @@ -4,13 +4,13 @@ # name: discourse-legacy_links # about: A plugin to handle legacy Gossamer Forums URLs -# version: 0.11 +# version: 0.12 # authors: saint@federated.computer # url: https://gitea.federated.computer/saint/discourse-legacy_links.git # require 'digest' -# enabled_site_setting :discourse_legacy_links_enabled +enabled_site_setting :discourse_legacy_links_enabled # after_initialize do after_initialize do @@ -21,7 +21,7 @@ after_initialize do end # Define the custom controller - class DiscourseLegacyLinks::CustomPostController < ::ApplicationController + class CustomPostController < ::ApplicationController # Match URLs that include a post_id at the end or query parameter # Main action triggered when the route is matched. def test @@ -127,7 +127,9 @@ after_initialize do end # Register custom routes to handle legacy URLs - Discourse::Application.routes.append do + Rails.looger.warn "[DEBUG DEBUG DEBUG DEBUG DEBUG WOW WOW WOW]" +# Discourse::Application.routes.append do +# Discourse::Application.routes.draw do get '/test_route' => 'discourse_legacy_links/custom_post#test' get '/forum/*path' => 'discourse_legacy_links/custom_post#index' get '/forum' => 'discourse_legacy_links/custom_post#index'