diff --git a/announcement_service_spec.yaml b/announcement_service_spec.yaml index 1bba363..2c7dad5 100644 --- a/announcement_service_spec.yaml +++ b/announcement_service_spec.yaml @@ -113,7 +113,7 @@ components: title: Patch note 1 changes: changes version: 1.0.0 - date: 2025-01-02 + patch_date: 2025-01-02 properties: patchID: format: uuid diff --git a/gen/openapi_server/controllers/patchnotes_controller.py b/gen/openapi_server/controllers/patchnotes_controller.py index 178b50b..08c718c 100644 --- a/gen/openapi_server/controllers/patchnotes_controller.py +++ b/gen/openapi_server/controllers/patchnotes_controller.py @@ -21,7 +21,6 @@ def patchnotes_date_get(date): # noqa: E501 :rtype: Union[List[PatchNotes], Tuple[List[PatchNotes], int], Tuple[List[PatchNotes], int, Dict[str, str]] """ - logging.error(type(date)) try: datetime.strptime(date, '%Y-%m-%d') # 2025-01-0 except ValueError as e: @@ -30,7 +29,6 @@ def patchnotes_date_get(date): # noqa: E501 detail="The date is invalid. Needs to be in this Format YYYY-MM-DD", status=400, ) - logging.error('date:' + str(date)) query = { 'patch_date': {'$gte': date} } @@ -57,7 +55,6 @@ def patchnotes_patch_iddelete(patch_id): # noqa: E501 :rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]] """ deleted_doc = collection.delete_one({'patchID': patch_id}) - logging.error(deleted_doc.deleted_count) if deleted_doc.deleted_count == 0: raise ProblemException( title="Not found", @@ -109,7 +106,6 @@ def patchnotes_patch_idput(patch_id, body): # noqa: E501 detail="No document has been deleted", status=404, ) - logging.error(result) return Response("Document was updated", status=200, mimetype='application/json') @@ -137,9 +133,6 @@ def patchnotes_post(body): status=400, ) - logging.error('patch_notes_type:' + str(type(date_obj))) - logging.error('patch notes' + str(pn)) - patch_note = { 'patchID': str(uuid.uuid4()), 'title': pn.title, @@ -148,9 +141,6 @@ def patchnotes_post(body): 'patch_date': date_str } - logging.error('patch_notes_type:' + str(type(patch_note))) - logging.error('patch notes' + str(patch_note)) - collection.insert_one(patch_note) patch_note_obj = PatchNotes.from_dict(patch_note) patch_note = patch_note_obj.to_dict() diff --git a/gen/openapi_server/openapi/openapi.yaml b/gen/openapi_server/openapi/openapi.yaml index 2fb126b..51717d8 100644 --- a/gen/openapi_server/openapi/openapi.yaml +++ b/gen/openapi_server/openapi/openapi.yaml @@ -126,7 +126,7 @@ components: title: Patch note 1 changes: changes version: 1.0.0 - date: 2025-01-02 + patch_date: 2025-01-02 properties: patchID: format: uuid