mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2025-12-06 15:15:36 +01:00
Add book filter service
This commit is contained in:
@@ -13,8 +13,10 @@ def check_token(api_key: str = Security(default_security)):
|
||||
)
|
||||
|
||||
|
||||
def get_allowed_langs(allowed_langs: Optional[list[str]] = Query(None)) -> list[str]:
|
||||
def get_allowed_langs(
|
||||
allowed_langs: Optional[list[str]] = Query(None),
|
||||
) -> frozenset[str]:
|
||||
if allowed_langs is not None:
|
||||
return allowed_langs
|
||||
return frozenset(allowed_langs)
|
||||
|
||||
return ["ru", "be", "uk"]
|
||||
return frozenset(("ru", "be", "uk"))
|
||||
|
||||
Reference in New Issue
Block a user