Recebendo
errorActionController::RoutingError (uninitialized constant DeleteUserPostsController)
lib/middleware/omniauth_bypass_middleware.rb:74:in `call'
lib/middleware/content_security_policy.rb:12:in `call'
lib/middleware/anonymous_cache.rb:369:in `call'
config/initializers/100-quiet_logger.rb:20:in `call'
config/initializers/100-silence_logger.rb:29:in `call'
lib/middleware/enforce_hostname.rb:24:in `call'
lib/middleware/request_tracker.rb:228:in `call'
Este é o meu código := plugin.rb
after_initialize do
Discourse::Application.routes.append do
get '/admin/plugins/delete_all_posts' => 'delete_user_posts#delete_test'
end
end
controller := app/controllers/delete_user_posts_controller.rb
class DeleteUserPostsController < ApplicationController
def delete_test
# Trigger the execution of the DeleteUserPosts job here
Jobs::DeleteUserPosts.new.execute({}) # Pass any necessary arguments to the execute method
render json: { message: 'Job triggered successfully' }
end
end
Qualquer ajuda será apreciada. Estou frustrado, estou preso nisso há um mês.