mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57:59 +01:00
format
This commit is contained in:
parent
c1992d272b
commit
0206c410de
2 changed files with 2 additions and 2 deletions
|
@ -47,7 +47,7 @@ defmodule PhilomenaWeb.ReportController do
|
||||||
|
|
||||||
_falsy ->
|
_falsy ->
|
||||||
case Reports.create_report(reportable.id, reportable_type, attribution, report_params) do
|
case Reports.create_report(reportable.id, reportable_type, attribution, report_params) do
|
||||||
{:ok, report} ->
|
{:ok, _report} ->
|
||||||
conn
|
conn
|
||||||
|> put_flash(
|
|> put_flash(
|
||||||
:info,
|
:info,
|
||||||
|
|
|
@ -30,7 +30,7 @@ defmodule PhilomenaWeb.Tag.AutocompleteController do
|
||||||
|> Elasticsearch.search_records(preload(Tag, :aliased_tag))
|
|> Elasticsearch.search_records(preload(Tag, :aliased_tag))
|
||||||
|> Enum.map(&(&1.aliased_tag || &1))
|
|> Enum.map(&(&1.aliased_tag || &1))
|
||||||
|> Enum.uniq_by(& &1.id)
|
|> Enum.uniq_by(& &1.id)
|
||||||
|> Enum.filter(& &1.images_count > 3)
|
|> Enum.filter(&(&1.images_count > 3))
|
||||||
|> Enum.sort_by(&(-&1.images_count))
|
|> Enum.sort_by(&(-&1.images_count))
|
||||||
|> Enum.take(5)
|
|> Enum.take(5)
|
||||||
|> Enum.map(&%{label: "#{&1.name} (#{&1.images_count})", value: &1.name})
|
|> Enum.map(&%{label: "#{&1.name} (#{&1.images_count})", value: &1.name})
|
||||||
|
|
Loading…
Reference in a new issue