mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-14 06:31:41 +00:00
procesar todas las urls
a veces las urls vienen como arrays, con lo que no hay que procesarlas.
This commit is contained in:
parent
00f303cf20
commit
655c6b65d5
1 changed files with 2 additions and 1 deletions
|
@ -133,7 +133,8 @@ class StatsController < ApplicationController
|
||||||
def normalized_urls
|
def normalized_urls
|
||||||
@normalized_urls ||=
|
@normalized_urls ||=
|
||||||
begin
|
begin
|
||||||
urls = params.permit(:urls).try(:[], :urls)&.split("\n")&.map(&:strip)&.select(&:present?)&.select do |uri|
|
urls = params[:urls].is_a?(Array) ? params[:urls] : params[:urls]&.split("\n")
|
||||||
|
urls = urls&.map(&:strip)&.select(&:present?)&.select do |uri|
|
||||||
uri.start_with? 'https://'
|
uri.start_with? 'https://'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue