Skip to content

Commit

Permalink
backend: 주석처리된 API 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
kimtaejin3 committed Dec 12, 2024
1 parent 314949c commit d262589
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,28 +116,6 @@ async def login_for_access_token(
)
return {"access_token": access_token, "token_type": "bearer"}

# 이미지 목록 읽기
# @app.get("/images/")
# async def read_images(page: int = 0, limit: int = 17, db: Session = Depends(get_db)):
# images = db.query(Images).offset(page * 17).limit(limit).all()
# return images

# @app.get("/images/")
# async def read_images(page: int = 0, limit: int = 17, db: Session = Depends(get_db)):
# # 전체 이미지 수 계산
# total_images = db.query(Images).count()

# # 현재 페이지의 이미지 가져오기
# images = db.query(Images).offset(page * limit).limit(limit).all()

# # 결과 반환
# return {
# "total": total_images,
# "page": page,
# "limit": limit,
# "images": images
# }

@app.get("/images/")
async def read_images(page: int = 0, limit: int = 17, search: str = Query(None), db: Session = Depends(get_db)):

Expand Down

0 comments on commit d262589

Please sign in to comment.