Fix Lint/UnusedArgument issues

This commit is contained in:
syeopite
2021-09-24 19:05:25 -07:00
parent 0614b52f03
commit 20cb751ff6
11 changed files with 16 additions and 16 deletions

View File

@@ -335,7 +335,7 @@ module Invidious::Routes::API::V1::Authenticated
case env.request.headers["Content-Type"]?
when "application/x-www-form-urlencoded"
scopes = env.params.body.select { |k, v| k.match(/^scopes\[\d+\]$/) }.map { |k, v| v }
scopes = env.params.body.select { |k, _| k.match(/^scopes\[\d+\]$/) }.map { |_, v| v }
callback_url = env.params.body["callbackUrl"]?
expire = env.params.body["expire"]?.try &.to_i?
when "application/json"

View File

@@ -395,7 +395,7 @@ module Invidious::Routes::Login
return templated "login"
end
tokens = env.params.body.select { |k, v| k.match(/^token\[\d+\]$/) }.map { |k, v| v }
tokens = env.params.body.select { |k, _| k.match(/^token\[\d+\]$/) }.map { |_, v| v }
answer ||= ""
captcha_type ||= "image"
@@ -419,7 +419,7 @@ module Invidious::Routes::Login
found_valid_captcha = false
error_exception = Exception.new
tokens.each_with_index do |token, i|
tokens.each do |token|
begin
validate_request(token, answer, env.request, HMAC_KEY, PG_DB, locale)
found_valid_captcha = true