Files
sdb-back/app/services/greeting_service.py
2025-06-27 13:14:29 +02:00

22 lines
586 B
Python

"""Service for handling greeting-related business logic."""
class GreetingService:
"""Service for greeting operations."""
@staticmethod
def get_greeting(name: str | None = None) -> dict[str, str]:
"""Get a greeting message.
Args:
name: Optional name to personalize the greeting
Returns:
Dictionary containing the greeting message
"""
if name:
message = f"Hello, {name}!"
else:
message = "Hello from backend!"
return {"message": message}