refactor: remove unused amount_threshold and keywords from notification filters

- Remove amount_threshold and keywords fields from NotificationFilters model
- Remove handling of these fields from API routes (GET/PUT)
- Update test to remove amount_threshold reference
- Simplify notification filtering to focus on case-sensitive/insensitive keywords only

These fields were not being used in the actual filtering logic and were just
adding unnecessary complexity to the configuration.
This commit is contained in:
Elisiário Couto
2025-09-09 17:01:47 +01:00
committed by Elisiário Couto
parent 2191fe9066
commit 957099786c
3 changed files with 0 additions and 10 deletions

View File

@@ -48,8 +48,6 @@ async def get_notification_settings() -> APIResponse:
filters=NotificationFilters(
case_insensitive=filters_config.get("case-insensitive", []),
case_sensitive=filters_config.get("case-sensitive"),
amount_threshold=filters_config.get("amount_threshold"),
keywords=filters_config.get("keywords", []),
),
)
@@ -92,10 +90,6 @@ async def update_notification_settings(settings: NotificationSettings) -> APIRes
filters_config["case-insensitive"] = settings.filters.case_insensitive
if settings.filters.case_sensitive:
filters_config["case-sensitive"] = settings.filters.case_sensitive
if settings.filters.amount_threshold:
filters_config["amount_threshold"] = settings.filters.amount_threshold
if settings.filters.keywords:
filters_config["keywords"] = settings.filters.keywords
# Save to config
if notifications_config: