diff --git a/SRV/api/v1/settings.py b/SRV/api/v1/settings.py index 4331550..ea370bf 100644 --- a/SRV/api/v1/settings.py +++ b/SRV/api/v1/settings.py @@ -1,16 +1,5 @@ -# api/v1/settings.py -import os -import json -import logging -import tempfile -from fastapi import APIRouter, HTTPException, Body -from starlette.responses import FileResponse +from fastapi import APIRouter, HTTPException from services.settings_service import SettingsService -import shutil - -# Настройка логирования -logging.basicConfig(level=logging.DEBUG) # Уровень DEBUG для детализации -logger = logging.getLogger(__name__) router = APIRouter() settings_service = SettingsService() @@ -70,16 +59,4 @@ def clear_all_data(): if success: return {"message": "Все сетевые данные успешно очищены"} except Exception as e: - raise HTTPException(status_code=500, detail=f"Ошибка очистки: {str(e)}") - -DEVICE_PATH = "/home/merelden/main/projects/all/gonets/SRV/storage/devices/devices.json" - -@router.get("/export", response_class=FileResponse) -async def export_devices(): - if not os.path.exists(DEVICE_PATH): - return {"error": "Файл не найден"} - return FileResponse( - path=DEVICE_PATH, - filename="device.json", - media_type="application/json" - ) \ No newline at end of file + raise HTTPException(status_code=500, detail=f"Ошибка очистки: {str(e)}") \ No newline at end of file