feat: add support for current balances in metrics

Extended `get_transparency_data` function to allow current balances by adding an `allow_current` parameter. This change facilitates the inclusion of up-to-date balance information in the metrics output, enhancing the accuracy of financial reporting.
This commit is contained in:
Kumi 2024-07-01 07:06:19 +02:00
parent 1acc142dba
commit 1e2d1e4119
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -107,7 +107,7 @@ def metrics():
(pathlib.Path(__file__).parent / "data" / "finances.json").read_text()
)
balances = get_transparency_data(finances)["end_balance"]
balances = get_transparency_data(finances, allow_current=True)["end_balance"]
response = (
"# HELP privatecoffee_balance The balance of the private.coffee account\n"