From 372e367b09cc44989a47afc6c4ac4b2566677ee4 Mon Sep 17 00:00:00 2001 From: Coldot <41678750+Coldot@users.noreply.github.com> Date: Sun, 23 Mar 2025 04:43:45 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20=EB=AC=B8=EC=84=9C=20=EC=A1=B0=ED=9A=8C?= =?UTF-8?q?=20=EA=B8=B0=EB=8A=A5=20=EA=B0=9C=EC=84=A0=20=EB=B0=8F=20?= =?UTF-8?q?=EB=B0=98=ED=99=98=20=ED=98=95=EC=8B=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repository/document_repository.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/main/document/repository/document_repository.py b/src/main/document/repository/document_repository.py index 5dd6c3e..8574a7c 100644 --- a/src/main/document/repository/document_repository.py +++ b/src/main/document/repository/document_repository.py @@ -83,4 +83,21 @@ def get_all_documents(): document_collection = db['document_collection'] documents = document_collection.find() - return list(documents) + result = [] + for doc in documents: + document = documentDetailDto( + document_id=str(doc["_id"]), + file_id=doc["file_id"], + document_name=doc["document_name"], + document_image_url=doc["document_image_url"], + introduction=doc["introduction"], + downloads=doc["downloads"], + pageNumber=doc["pageNumber"], + upload_date=doc["upload_date"], + uploader=doc["uploader_id"], + price=doc["price"], + category=doc["category"], + rating=doc["rating"] + ) + result.append(document) + return result