2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-10-31 08:02:26 -04:00
|
|
|
class Admin::ScreenedUrlsController < Admin::StaffController
|
2013-08-15 10:48:30 -04:00
|
|
|
def index
|
2013-11-04 16:31:31 -05:00
|
|
|
screened_urls =
|
|
|
|
ScreenedUrl
|
|
|
|
.select(
|
|
|
|
"domain, sum(match_count) as match_count, max(last_match_at) as last_match_at, min(created_at) as created_at",
|
2023-01-09 07:20:10 -05:00
|
|
|
)
|
2013-11-04 16:31:31 -05:00
|
|
|
.group(:domain)
|
|
|
|
.order("last_match_at DESC")
|
|
|
|
.to_a
|
2013-11-04 16:24:32 -05:00
|
|
|
render_serialized(screened_urls, GroupedScreenedUrlSerializer)
|
2013-08-15 10:48:30 -04:00
|
|
|
end
|
|
|
|
end
|