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
|
||||
|
||||
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 }}
|
||||
{% end %}
|
||||
|
||||
@ -44,7 +44,7 @@ class Kemal::RouteHandler
|
||||
end
|
||||
|
||||
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 }}
|
||||
{% end %}
|
||||
|
||||
@ -72,7 +72,7 @@ class FilteredCompressHandler < HTTP::CompressHandler
|
||||
end
|
||||
|
||||
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 }}
|
||||
{% end %}
|
||||
|
||||
@ -121,7 +121,7 @@ class AuthHandler < Kemal::Handler
|
||||
end
|
||||
|
||||
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 }}
|
||||
{% end %}
|
||||
exclude ["/api/v1/auth/notifications"], "GET"
|
||||
|
||||
@ -55,7 +55,7 @@ class Invidious::LogHandler < Kemal::BaseLogHandler
|
||||
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)
|
||||
if LogLevel::{{ level.id.capitalize }} >= @level
|
||||
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
|
||||
|
||||
if methods.empty?
|
||||
methods = %w(GET POST PUT HEAD DELETE PATCH OPTIONS)
|
||||
methods = %w[GET POST PUT HEAD DELETE PATCH OPTIONS]
|
||||
end
|
||||
|
||||
if methods & subset_methods != subset_methods
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user