Skip to content

Commit eb4e891

Browse files
committed
Refactor handler loading to remove unused parameter for compatibility
1 parent bb0e370 commit eb4e891

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lib/hooks/app/api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def self.create(config:, endpoints:, log:)
6969
end
7070

7171
payload = parse_payload(raw_body, headers, symbolize: config[:symbolize_payload])
72-
handler = load_handler(handler_class_name, config[:handler_plugin_dir])
72+
handler = load_handler(handler_class_name)
7373
normalized_headers = config[:normalize_headers] ? Hooks::Utils::Normalize.headers(headers) : headers
7474

7575
response = handler.call(

lib/hooks/app/helpers.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,9 @@ def parse_payload(raw_body, headers, symbolize: true)
6565
# Load handler class
6666
#
6767
# @param handler_class_name [String] The name of the handler class to load
68-
# @param handler_dir [String] The directory containing handler files (unused - kept for compatibility)
6968
# @return [Object] An instance of the loaded handler class
7069
# @raise [StandardError] If handler cannot be found
71-
def load_handler(handler_class_name, handler_dir = nil)
70+
def load_handler(handler_class_name)
7271
# Get handler class from loaded plugins registry (boot-time loaded only)
7372
begin
7473
handler_class = Core::PluginLoader.get_handler_plugin(handler_class_name)

0 commit comments

Comments
 (0)