Refactor services

This commit is contained in:
2022-07-19 21:59:32 +03:00
parent 532ce1c3c3
commit e0aec69240
8 changed files with 103 additions and 113 deletions

View File

@@ -42,7 +42,7 @@ async def get_random_author(
allowed_langs: frozenset[str] = Depends(get_allowed_langs),
):
author_id = await GetRandomAuthorService.get_random_id(
allowed_langs, request.app.state.redis
{"allowed_langs": allowed_langs}, request.app.state.redis
)
return (

View File

@@ -44,7 +44,7 @@ async def get_random_book(
allowed_langs: frozenset[str] = Depends(get_allowed_langs),
):
book_id = await GetRandomBookService.get_random_id(
allowed_langs, request.app.state.redis
{"allowed_langs": allowed_langs}, request.app.state.redis
)
book = (

View File

@@ -32,7 +32,7 @@ async def get_random_sequence(
allowed_langs: frozenset[str] = Depends(get_allowed_langs),
):
sequence_id = await GetRandomSequenceService.get_random_id(
allowed_langs,
{"allowed_langs": allowed_langs},
request.app.state.redis,
)