Skip to content

Commit acfe5d2

Browse files
committed
경로에 /api 추가
1 parent c7dced3 commit acfe5d2

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

app/handlers/auth_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
1111

1212
router = APIRouter(
13-
prefix="/users"
13+
prefix="/api/users"
1414
)
1515
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/users/token")
1616

app/handlers/category_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing import List
66

77
router = APIRouter(
8-
prefix="/categories"
8+
prefix="/api/categories"
99
)
1010

1111
class CategoryRequest(BaseModel):

app/handlers/chat_handlers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
chat_service = ChatService()
1111

1212
# 채팅방 생성
13-
@router.post("/products/{product_id}/chats")
13+
@router.post("/api/products/{product_id}/chats")
1414
def create_chatroom(
1515
product_id: int,
1616
current_user=Depends(get_current_user),
@@ -28,7 +28,7 @@ def create_chatroom(
2828
)
2929

3030
# 채팅방 목록 조회
31-
@router.get("/chats")
31+
@router.get("/api/chats")
3232
def get_chatrooms(
3333
current_user=Depends(get_current_user),
3434
session=Depends(get_db_session)):
@@ -44,7 +44,7 @@ def get_chatrooms(
4444
])
4545

4646
# 채팅방 상세 조회 (메세지 조회)
47-
@router.get("/chats/{chatroom_id}")
47+
@router.get("/api/chats/{chatroom_id}")
4848
def get_chats(
4949
chatroom_id: int,
5050
current_user=Depends(get_current_user),

app/handlers/comment_handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from app.db import get_db_session
77
from app.services.comment_service import CommentService
88

9-
router = APIRouter(prefix="/comments")
9+
router = APIRouter(prefix="/api/comments")
1010
comment_service = CommentService()
1111

1212
# 댓글 목록 조회

app/handlers/product_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from sqlmodel import Session, asc, desc, select
99

1010
router = APIRouter(
11-
prefix="/products"
11+
prefix="/api/products"
1212
)
1313

1414
def validate_product_id(

app/handlers/profile_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
1111

1212
router = APIRouter(
13-
prefix="/users"
13+
prefix="/api/users"
1414
)
1515

1616
# 판매 내역 조회

app/handlers/ws_handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_user_id_from_query(ws: WebSocket):
1616
raise HTTPException(status_code=400, detail="user_id query parameter is required")
1717
return int(user_id)
1818

19-
@router.websocket("/chats/{chatroom_id}/message")
19+
@router.websocket("/api/chats/{chatroom_id}/message")
2020
async def chatroom_websocket(ws: WebSocket, chatroom_id: int, user_id: int = Depends(get_user_id_from_query), session: Session = Depends(get_db_session)):
2121
"""WebSocket을 이용한 실시간 채팅 기능"""
2222

@@ -71,7 +71,7 @@ async def chatroom_websocket(ws: WebSocket, chatroom_id: int, user_id: int = Dep
7171
await ws_manager.send_to_room(chatroom_id, f"사용자가 {user_id} 퇴장했습니다.")
7272

7373

74-
@router.post("/chats/{chatroom_id}/messages")
74+
@router.post("/api/chats/{chatroom_id}/messages")
7575
def send_message(
7676
chatroom_id: int,
7777
message: MessageResponse,

0 commit comments

Comments
 (0)