Spaces:
Running
Running
File size: 407 Bytes
a5c1fa0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | """Utility functions for the auth module."""
def sanitize_input(text: str) -> str:
"""Remove leading/trailing whitespace and normalize."""
if not isinstance(text, str):
return ""
return text.strip().lower()
def format_response(status: str, data: dict = None) -> dict:
"""Format a standard API response."""
return {
"status": status,
"data": data or {},
}
|