Make logger a constant

Instead of passing around `logger` there is now the global `LOGGER`.
This commit is contained in:
saltycrys
2021-01-04 16:51:06 +01:00
parent 7a8620a570
commit 6365ee7487
13 changed files with 103 additions and 115 deletions

View File

@@ -1,14 +1,14 @@
module Invidious::Routing
macro get(path, controller, method = :handle)
get {{ path }} do |env|
controller_instance = {{ controller }}.new(config, logger)
controller_instance = {{ controller }}.new(config)
controller_instance.{{ method.id }}(env)
end
end
macro post(path, controller, method = :handle)
post {{ path }} do |env|
controller_instance = {{ controller }}.new(config, logger)
controller_instance = {{ controller }}.new(config)
controller_instance.{{ method.id }}(env)
end
end