mirror of
https://github.com/elisiariocouto/leggen.git
synced 2025-12-14 00:22:16 +00:00
feat: improve notification filters configuration format
- Change filters config from nested dict to simple arrays - Update NotificationFilters model to use List[str] instead of Dict[str, str] - Modify notification service to handle list-based filters - Update API routes and tests for new format - Update README with new configuration example Before: [filters.case-insensitive] salary = 'salary' After: [filters] case-insensitive = ['salary', 'utility']
This commit is contained in:
committed by
Elisiário Couto
parent
bc947183e3
commit
2191fe9066
@@ -1,4 +1,4 @@
|
||||
from typing import Dict, Optional, List
|
||||
from typing import Optional, List
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
@@ -21,8 +21,8 @@ class TelegramConfig(BaseModel):
|
||||
class NotificationFilters(BaseModel):
|
||||
"""Notification filters configuration"""
|
||||
|
||||
case_insensitive: Dict[str, str] = {}
|
||||
case_sensitive: Optional[Dict[str, str]] = None
|
||||
case_insensitive: List[str] = []
|
||||
case_sensitive: Optional[List[str]] = None
|
||||
amount_threshold: Optional[float] = None
|
||||
keywords: List[str] = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user