Статистика для дашборда #7

This commit is contained in:
2026-04-28 21:31:22 +03:00
parent 967a024d0c
commit c87d56bb49
18 changed files with 210 additions and 167 deletions
+4 -1
View File
@@ -10,6 +10,7 @@
update_subscription/2,
delete_subscription/1
]).
-export([count_subscription/0]).
-define(TRIAL_DAYS, 30).
@@ -214,4 +215,6 @@ apply_updates(Sub, Updates) ->
Acc#subscription{expires_at = Value, updated_at = calendar:universal_time()};
_ -> Acc
end
end, Sub, maps:to_list(Updates)).
end, Sub, maps:to_list(Updates)).
count_subscription() -> mnesia:table_info(subscription, size).