mirror of
https://github.com/iv-org/invidious.git
synced 2026-01-28 15:58:30 -06:00
Fix Style/PercentLiteralDelimiters type of Ameba issues
This commit is contained in:
parent
dd185c9379
commit
b5b187ad88
@ -20,7 +20,7 @@ module HTTP::Handler
|
|||||||
end
|
end
|
||||||
|
|
||||||
class Kemal::RouteHandler
|
class Kemal::RouteHandler
|
||||||
{% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %}
|
{% for method in %w[GET POST PUT HEAD DELETE PATCH OPTIONS] %}
|
||||||
exclude ["/api/v1/*"], {{ method }}
|
exclude ["/api/v1/*"], {{ method }}
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ class Kemal::RouteHandler
|
|||||||
end
|
end
|
||||||
|
|
||||||
class Kemal::ExceptionHandler
|
class Kemal::ExceptionHandler
|
||||||
{% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %}
|
{% for method in %w[GET POST PUT HEAD DELETE PATCH OPTIONS] %}
|
||||||
exclude ["/api/v1/*"], {{ method }}
|
exclude ["/api/v1/*"], {{ method }}
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ class FilteredCompressHandler < HTTP::CompressHandler
|
|||||||
end
|
end
|
||||||
|
|
||||||
class AuthHandler < Kemal::Handler
|
class AuthHandler < Kemal::Handler
|
||||||
{% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %}
|
{% for method in %w[GET POST PUT HEAD DELETE PATCH OPTIONS] %}
|
||||||
only ["/api/v1/auth/*"], {{ method }}
|
only ["/api/v1/auth/*"], {{ method }}
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ class AuthHandler < Kemal::Handler
|
|||||||
end
|
end
|
||||||
|
|
||||||
class APIHandler < Kemal::Handler
|
class APIHandler < Kemal::Handler
|
||||||
{% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %}
|
{% for method in %w[GET POST PUT HEAD DELETE PATCH OPTIONS] %}
|
||||||
only ["/api/v1/*"], {{ method }}
|
only ["/api/v1/*"], {{ method }}
|
||||||
{% end %}
|
{% end %}
|
||||||
exclude ["/api/v1/auth/notifications"], "GET"
|
exclude ["/api/v1/auth/notifications"], "GET"
|
||||||
|
|||||||
@ -55,7 +55,7 @@ class Invidious::LogHandler < Kemal::BaseLogHandler
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
{% for level in %w(trace debug info warn error fatal) %}
|
{% for level in %w[trace debug info warn error fatal] %}
|
||||||
def {{ level.id }}(message : String)
|
def {{ level.id }}(message : String)
|
||||||
if LogLevel::{{ level.id.capitalize }} >= @level
|
if LogLevel::{{ level.id.capitalize }} >= @level
|
||||||
puts("#{Time.utc} [{{ level.id }}] #{message}".colorize(color(LogLevel::{{ level.id.capitalize }})))
|
puts("#{Time.utc} [{{ level.id }}] #{message}".colorize(color(LogLevel::{{ level.id.capitalize }})))
|
||||||
|
|||||||
@ -116,7 +116,7 @@ def scope_includes_scope(scope, subset)
|
|||||||
subset_endpoint = subset_endpoint.downcase
|
subset_endpoint = subset_endpoint.downcase
|
||||||
|
|
||||||
if methods.empty?
|
if methods.empty?
|
||||||
methods = %w(GET POST PUT HEAD DELETE PATCH OPTIONS)
|
methods = %w[GET POST PUT HEAD DELETE PATCH OPTIONS]
|
||||||
end
|
end
|
||||||
|
|
||||||
if methods & subset_methods != subset_methods
|
if methods & subset_methods != subset_methods
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user