Compare commits

..

2 Commits
0.6.2 ... 0.6.3

Author SHA1 Message Date
Elisiário Couto
ebe0a2fe86 chore(ci): Bump version to 0.6.3 2024-06-07 20:46:49 +01:00
Elisiário Couto
3cb38e2e9f feat(sync): Correctly calculate days left, based on the default 90 days period. 2024-06-07 20:46:45 +01:00
3 changed files with 11 additions and 3 deletions

View File

@@ -1,3 +1,10 @@
## 0.6.3 (2024/06/07)
### Features
- **sync:** Correctly calculate days left, based on the default 90 days period. ([3cb38e2e](https://github.com/elisiariocouto/leggen/commit/3cb38e2e9fb08e07664caa7daa9aa651262bd213))
## 0.6.2 (2024/06/07) ## 0.6.2 (2024/06/07)
### Bug Fixes ### Bug Fixes

View File

@@ -27,13 +27,14 @@ def sync(ctx: click.Context):
if account_status != "LINKED": if account_status != "LINKED":
created_at = datetime.datetime.fromisoformat(r["created"]) created_at = datetime.datetime.fromisoformat(r["created"])
now = datetime.datetime.now(tz=datetime.timezone.utc) now = datetime.datetime.now(tz=datetime.timezone.utc)
if (created_at - now).days <= 15: days_left = 90 - (created_at - now).days
if days_left <= 15:
n = { n = {
"bank": r["institution_id"], "bank": r["institution_id"],
"status": REQUISITION_STATUS.get(r["status"], "UNKNOWN"), "status": REQUISITION_STATUS.get(r["status"], "UNKNOWN"),
"created_at": created_at.timestamp(), "created_at": created_at.timestamp(),
"requisition_id": r["id"], "requisition_id": r["id"],
"days_left": (created_at - now).days, "days_left": days_left,
} }
send_expire_notification(ctx, n) send_expire_notification(ctx, n)

View File

@@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "leggen" name = "leggen"
version = "0.6.2" version = "0.6.3"
description = "An Open Banking CLI" description = "An Open Banking CLI"
authors = ["Elisiário Couto <elisiario@couto.io>"] authors = ["Elisiário Couto <elisiario@couto.io>"]
readme = "README.md" readme = "README.md"