"백엔드_핵심_로직_구현_프론트엔드_연동_및_도커_배포_최적화_완료"

This commit is contained in:
2026-02-03 00:52:54 +09:00
parent ed8fc0943b
commit eeddc62089
32 changed files with 1287 additions and 318 deletions

View File

@@ -6,8 +6,10 @@ from pydantic import BaseModel
from app.db.database import get_db
from app.db.models import ApiSettings
from app.services.kis_auth import kis_auth
import logging
router = APIRouter()
logger = logging.getLogger("SettingsAPI")
class SettingsSchema(BaseModel):
# Partial schema for updates
@@ -50,6 +52,7 @@ async def get_settings(db: AsyncSession = Depends(get_db)):
@router.put("/", response_model=SettingsSchema)
async def update_settings(payload: SettingsSchema, db: AsyncSession = Depends(get_db)):
logger.info("Updating API Settings...")
stmt = select(ApiSettings).where(ApiSettings.id == 1)
result = await db.execute(stmt)
settings = result.scalar_one_or_none()