mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-16 09:58:50 +00:00
Make logger a constant
Instead of passing around `logger` there is now the global `LOGGER`.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user