refactor: Improve code readability by formatting query parameters in user endpoints and enhancing error handling in sound playback
This commit is contained in:
@@ -51,11 +51,13 @@ async def list_users( # noqa: PLR0913
|
||||
limit: Annotated[int, Query(description="Items per page", ge=1, le=100)] = 50,
|
||||
search: Annotated[str | None, Query(description="Search in name or email")] = None,
|
||||
sort_by: Annotated[
|
||||
UserSortField, Query(description="Sort by field"),
|
||||
UserSortField,
|
||||
Query(description="Sort by field"),
|
||||
] = UserSortField.NAME,
|
||||
sort_order: Annotated[SortOrder, Query(description="Sort order")] = SortOrder.ASC,
|
||||
status_filter: Annotated[
|
||||
UserStatus, Query(description="Filter by status"),
|
||||
UserStatus,
|
||||
Query(description="Filter by status"),
|
||||
] = UserStatus.ALL,
|
||||
) -> dict[str, Any]:
|
||||
"""Get all users with pagination, search, and filters (admin only)."""
|
||||
|
||||
Reference in New Issue
Block a user