diff --git a/routers/tariffs.py b/routers/tariffs.py index 17d021a..d051cc0 100644 --- a/routers/tariffs.py +++ b/routers/tariffs.py @@ -9,7 +9,12 @@ router = APIRouter(prefix='/api/v1', tags=['tariffs']) async def get_tariffs_from_file(): async with aiofiles.open('data/tariffs.json', 'r', encoding='utf-8') as f: content = await f.read() - return json.loads(content) # <- блокирующая операция, но с маленьким контентом + кэш + data = json.loads(content) # <- блокирующая операция, но с маленьким контентом + кэш + + # Удаляем squad_uuids + for tariff in data.get('tariffs', []): + tariff.pop('squad_uuids', None) + return data @router.get('/tariffs') async def get_tariffs():