mirror of
https://github.com/plausible/analytics.git
synced 2024-12-27 19:47:26 +03:00
d2270f3c35
* use more convenient testing functions * do not display + sign with 0% change in emails * Rename module/file/function names before, `weekly_report` was also used for monthly reports and that was a bit confusing to read in code. * Refactor send_email_report.ex This commit improves readability by refactoring the code into smaller functions and reducing the number of arguments given to functions. But more importantly, it stops making duplicate stats queries for every email recipient by moving the queries out of the for loop. * Refactor: move querying logic out of the worker module and merge all stats information under a single `stats` assign.
8 lines
191 B
Elixir
8 lines
191 B
Elixir
defmodule PlausibleWeb.MJML.StatsReport do
|
|
@moduledoc """
|
|
MJML rendered for the weekly or monthly report e-mail
|
|
"""
|
|
|
|
use MjmlEEx, mjml_template: "templates/stats_report.mjml.eex"
|
|
end
|