Refactor OAuth provider linking and unlinking logic into a dedicated service; enhance error handling and logging throughout the application; improve sound management and scanning services with better file handling and unique naming; implement centralized error and logging services for consistent API responses and application-wide logging configuration.
This commit is contained in:
@@ -46,7 +46,7 @@ class CreditService:
|
||||
for user in users:
|
||||
if not user.plan:
|
||||
logger.warning(
|
||||
f"User {user.email} has no plan assigned, skipping"
|
||||
f"User {user.email} has no plan assigned, skipping",
|
||||
)
|
||||
continue
|
||||
|
||||
@@ -57,7 +57,8 @@ class CreditService:
|
||||
|
||||
# Add daily credits but don't exceed maximum
|
||||
new_credits = min(
|
||||
current_credits + plan_daily_credits, max_credits
|
||||
current_credits + plan_daily_credits,
|
||||
max_credits,
|
||||
)
|
||||
credits_added = new_credits - current_credits
|
||||
|
||||
|
||||
Reference in New Issue
Block a user