From c4eb0ac0e55ef1b238706ba599d633283533be72 Mon Sep 17 00:00:00 2001 From: austnv Date: Sun, 14 Jun 2026 23:24:32 +0300 Subject: [PATCH] refactoring --- routers/tariffs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/tariffs.py b/routers/tariffs.py index eb5ba73..4683ce7 100644 --- a/routers/tariffs.py +++ b/routers/tariffs.py @@ -6,11 +6,11 @@ from async_lru import alru_cache router = APIRouter(prefix='/api/v1', tags=['tariffs']) @alru_cache(maxsize=1, ttl=86400) -async def get_tariffs_sync(): +async def get_tariffs(): async with aiofiles.open('data/tariffs.json', 'r', encoding='utf-8') as f: content = await f.read() return json.loads(content) @router.get('/tariffs') async def get_tariffs(): - return await get_tariffs_sync() \ No newline at end of file + return await get_tariffs() \ No newline at end of file