You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
analytics/lib/plausible_web/controllers/api
RobertJoonas d2270f3c35
Small bugfix + refactor email reports (#3642)
* 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.
3 years ago
..
external_controller.ex derive jason encoder for request (#3182) 3 years ago
external_stats_controller.ex Fix filter suggestions (#3265) 3 years ago
helpers.ex Block Stats API for locked sites (#2302) 4 years ago
internal_controller.ex Implement pinned sites (#3469) 3 years ago
paddle_controller.ex Move limit enforcement to accepting site ownership transfer (#3612) 3 years ago
stats_controller.ex Small bugfix + refactor email reports (#3642) 3 years ago