Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apps/pre-processing-service/app/api/endpoints/product.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from fastapi import APIRouter, Request, HTTPException
from app.decorators.logging import log_api_call
from ...errors.CustomException import (
InvalidItemDataException,
ItemNotFoundException,
Expand Down
45 changes: 0 additions & 45 deletions apps/pre-processing-service/app/api/endpoints/sample.py

This file was deleted.

5 changes: 0 additions & 5 deletions apps/pre-processing-service/app/api/endpoints/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
from fastapi import APIRouter
from sqlalchemy import text

from app.decorators.logging import log_api_call
from ...errors.CustomException import *
from fastapi import APIRouter
from typing import Mapping, Any, Dict
from ...model.schemas import *
from ...service.blog.blog_create_service import BlogContentService
from ...service.blog.naver_blog_post_service import NaverBlogPostService
from ...service.blog.tistory_blog_post_service import TistoryBlogPostService
from ...service.crawl_service import CrawlService
from ...service.keyword_service import keyword_search
from ...service.match_service import MatchService
Expand All @@ -27,7 +25,6 @@


@router.get("/hello/{name}", tags=["hello"])
# @log_api_call
async def say_hello(name: str):
return {"message": f"Hello {name}"}

Expand Down Expand Up @@ -122,8 +119,6 @@ async def processing_tester():
# tistory_service = TistoryBlogPostService()
naverblogPostService = NaverBlogPostService()
result = naverblogPostService.post_content(
# blog_id="wtecho331",
# blog_pw="wt505033@#",
title=data.get("title"),
content=data.get("content"),
tags=data.get("tags"),
Expand Down
14 changes: 2 additions & 12 deletions apps/pre-processing-service/app/api/router.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# app/api/router.py
from fastapi import APIRouter
from .endpoints import keywords, blog, product, test, sample
from .endpoints import keywords, blog, product, test
from ..core.config import settings

api_router = APIRouter()
Expand All @@ -15,19 +15,9 @@
api_router.include_router(product.router, prefix="/products", tags=["product"])

# 모듈 테스터를 위한 endpoint -> 추후 삭제 예정
api_router.include_router(test.router, prefix="/tests", tags=["Test"])

api_router.include_router(sample.router, prefix="/v0", tags=["Sample"])
# api_router.include_router(test.router, prefix="/tests", tags=["Test"])


@api_router.get("/ping")
async def root():
return {"message": "서버 실행중입니다."}


@api_router.get("/db")
def get_settings():
"""
환경 변수가 올바르게 로드되었는지 확인하는 엔드포인트
"""
return {"환경": settings.env_name, "데이터베이스 URL": settings.db_url}
Empty file.
85 changes: 0 additions & 85 deletions apps/pre-processing-service/app/decorators/logging.py

This file was deleted.

6 changes: 3 additions & 3 deletions apps/pre-processing-service/app/errors/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ async def validation_exception_handler(request: Request, exc: RequestValidationE
"""
# 변경점: ErrorBaseModel을 기본 구조로 사용하고, 추가 정보를 더함
base_error = ErrorBaseModel(
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
detail=ERROR_MESSAGES[status.HTTP_422_UNPROCESSABLE_ENTITY],
status_code=status.HTTP_422_UNPROCESSABLE_CONTENT,
detail=ERROR_MESSAGES[status.HTTP_422_UNPROCESSABLE_CONTENT],
code="VALIDATION_ERROR",
)

Expand All @@ -67,7 +67,7 @@ async def validation_exception_handler(request: Request, exc: RequestValidationE
response_content["details"] = exc.errors()

return JSONResponse(
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
status_code=status.HTTP_422_UNPROCESSABLE_CONTENT,
content=response_content,
)

Expand Down
2 changes: 1 addition & 1 deletion apps/pre-processing-service/app/errors/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
status.HTTP_401_UNAUTHORIZED: "인증이 필요합니다.",
status.HTTP_403_FORBIDDEN: "접근 권한이 없습니다.",
status.HTTP_404_NOT_FOUND: "요청하신 리소스를 찾을 수 없습니다.",
status.HTTP_422_UNPROCESSABLE_ENTITY: "입력 데이터가 유효하지 않습니다.",
status.HTTP_422_UNPROCESSABLE_CONTENT: "입력 데이터가 유효하지 않습니다.",
status.HTTP_500_INTERNAL_SERVER_ERROR: "서버 내부 오류가 발생했습니다.",
}

Expand Down

This file was deleted.

Loading
Loading