원 레포랑 완전 분리
This commit is contained in:
20
workspace/services/dummy_service.py
Normal file
20
workspace/services/dummy_service.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import json
|
||||
from fastapi.responses import JSONResponse
|
||||
from config.setting import STATIC_DIR
|
||||
|
||||
class DummyService:
|
||||
@staticmethod
|
||||
async def extract_dummy():
|
||||
"""
|
||||
static 디렉터리의 더미 JSON 응답 파일을 반환합니다.
|
||||
"""
|
||||
dummy_path = STATIC_DIR / "dummy_response.json"
|
||||
try:
|
||||
with open(dummy_path, "r", encoding="utf-8") as f:
|
||||
dummy_data = json.load(f)
|
||||
return JSONResponse(content=dummy_data)
|
||||
except Exception as e:
|
||||
return JSONResponse(
|
||||
status_code=500,
|
||||
content={"error": f"❌ 더미 파일을 불러오지 못했습니다: {e}"}
|
||||
)
|
||||
Reference in New Issue
Block a user