Do not reverse order of reports. We want newest ones sorted to the top.
This commit is contained in:
parent
38924166eb
commit
744b34709d
|
@ -19,8 +19,7 @@ def render("index.json", %{reports: reports}) do
|
||||||
reports:
|
reports:
|
||||||
reports[:items]
|
reports[:items]
|
||||||
|> Enum.map(&Report.extract_report_info/1)
|
|> Enum.map(&Report.extract_report_info/1)
|
||||||
|> Enum.map(&render(__MODULE__, "show.json", &1))
|
|> Enum.map(&render(__MODULE__, "show.json", &1)),
|
||||||
|> Enum.reverse(),
|
|
||||||
total: reports[:total]
|
total: reports[:total]
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue