From d26258990c263cbbdd2be1408ce9ad3d0622f4cb Mon Sep 17 00:00:00 2001 From: kimtaejin3 Date: Thu, 12 Dec 2024 21:00:07 +0900 Subject: [PATCH] =?UTF-8?q?backend:=20=EC=A3=BC=EC=84=9D=EC=B2=98=EB=A6=AC?= =?UTF-8?q?=EB=90=9C=20API=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/main.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/backend/main.py b/backend/main.py index f575132..77d447b 100644 --- a/backend/main.py +++ b/backend/main.py @@ -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)):