diff --git a/main.py b/main.py index ec15333..e351ab8 100644 --- a/main.py +++ b/main.py @@ -64,15 +64,15 @@ async def lifespan(app: FastAPI): days = lic_status["days_remaining"] cust = lic_status["customer"] if lic_status.get("is_trial"): - print(f"[LICENSE] 🎁 TRIAL μ²΄ν—˜νŒ ν™œμ„± (D-{days}) β€” {cust}") + print(f"[LICENSE] TRIAL μ²΄ν—˜νŒ ν™œμ„± (D-{days}) - {cust}") else: - print(f"[LICENSE] {edition} λΌμ΄μ„ μŠ€ ν™œμ„± ({days}일 λ‚¨μŒ) β€” {cust}") + print(f"[LICENSE] {edition} λΌμ΄μ„ μŠ€ ν™œμ„± ({days}일 λ‚¨μŒ) - {cust}") if lic_status.get("expiry_warning"): - print(f"[LICENSE] ⚠️ 만료 {days}일 λ‚¨μŒ β€” 갱신을 μ€€λΉ„ν•˜μ„Έμš”.") + print(f"[LICENSE] 만료 {days}일 λ‚¨μŒ - 갱신을 μ€€λΉ„ν•˜μ„Έμš”.") elif lic_status.get("expired"): - print("[LICENSE] ❌ λΌμ΄μ„ μŠ€κ°€ λ§Œλ£Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€. 갱신이 ν•„μš”ν•©λ‹ˆλ‹€.") + print("[LICENSE] λΌμ΄μ„ μŠ€κ°€ λ§Œλ£Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€. 갱신이 ν•„μš”ν•©λ‹ˆλ‹€.") else: - print("[LICENSE] λΌμ΄μ„ μŠ€ 미등둝 β€” /license μ—μ„œ 무료 μ²΄ν—˜μ„ μ‹œμž‘ν•˜κ±°λ‚˜ ν‚€λ₯Ό λ“±λ‘ν•˜μ„Έμš”.") + print("[LICENSE] λΌμ΄μ„ μŠ€ 미등둝 - /license μ—μ„œ 무료 μ²΄ν—˜μ„ μ‹œμž‘ν•˜κ±°λ‚˜ ν‚€λ₯Ό λ“±λ‘ν•˜μ„Έμš”.") # A-1: WebSocket ↔ SSE 톡합 패치 from routers.ws import _integrate_with_sse_bus diff --git a/routers/messenger.py b/routers/messenger.py index 98e698f..32a220d 100644 --- a/routers/messenger.py +++ b/routers/messenger.py @@ -251,7 +251,7 @@ async def handle_bot_command( title = " ".join(parts[1:]) if len(parts) >= 2 else "" if not title: return BotReply(room=cmd.room, text="μ‚¬μš©λ²•: /sr ") - bg.add_task(_cmd_create_sr, cmd.room, cmd.user, title, db) + bg.add_task(_cmd_create_sr, cmd.room, cmd.user, title) return BotReply(room=cmd.room, text=f"[SR μ ‘μˆ˜] '{title}' 처리 쀑...") # ── /status (μŠ¬λž˜μ‹œ μŠ€νƒ€μΌ μ‹œμŠ€ν…œ ν˜„ν™©) ───────────────────────────────── @@ -463,8 +463,8 @@ async def _cmd_sm(room: str, actor: str, server: str, ) -async def _cmd_create_sr(room: str, actor: str, title: str, db): - """μŠ¬λž˜μ‹œ /sr λͺ…λ Ή β€” SR λΉ λ₯Έ μ ‘μˆ˜.""" +async def _cmd_create_sr(room: str, actor: str, title: str): + """μŠ¬λž˜μ‹œ /sr λͺ…λ Ή β€” SR λΉ λ₯Έ μ ‘μˆ˜ (λ‚΄λΆ€ API 호좜).""" import httpx as _httpx try: async with _httpx.AsyncClient(timeout=10.0) as client: diff --git a/routers/tasks.py b/routers/tasks.py index fc319eb..899091b 100644 --- a/routers/tasks.py +++ b/routers/tasks.py @@ -428,6 +428,8 @@ async def bulk_sr_action( from models import UserRole if current_user.role == UserRole.CUSTOMER: raise HTTPException(403, "λŒ€λŸ‰ μž‘μ—…μ€ ADMIN/PM/ENGINEER만 κ°€λŠ₯ν•©λ‹ˆλ‹€.") + if not payload.sr_ids: + raise HTTPException(400, "sr_idsκ°€ λΉ„μ–΄ μžˆμŠ΅λ‹ˆλ‹€. μ²˜λ¦¬ν•  SR IDλ₯Ό μž…λ ₯ν•˜μ„Έμš”.") if len(payload.sr_ids) > 100: raise HTTPException(400, "ν•œ λ²ˆμ— μ΅œλŒ€ 100κ±΄κΉŒμ§€ 처리 κ°€λŠ₯ν•©λ‹ˆλ‹€.")