Compare commits
No commits in common. "9b8171db5b1ec4786a3ba51ee6db4697cb84fb8e" and "10f2dc1faf1b66a64c7099a8444152d68b8d8847" have entirely different histories.
9b8171db5b
...
10f2dc1faf
|
|
@ -10,7 +10,6 @@ from __main__ import collection
|
|||
from openapi_server.__main__ import collection
|
||||
from openapi_server.models.patch_notes import PatchNotes # noqa: E501
|
||||
|
||||
|
||||
def patchnotes_date_get(date): # noqa: E501
|
||||
"""patchnotes_date_get
|
||||
|
||||
|
|
@ -21,7 +20,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 +28,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 +54,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 +105,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')
|
||||
|
||||
|
||||
|
|
@ -157,6 +152,14 @@ def patchnotes_post(body):
|
|||
return Response(json_util.dumps(patch_note), mimetype='application/json',
|
||||
status=200)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def patchnotes_post(body):
|
||||
"""patchnotes_post
|
||||
|
||||
|
|
@ -185,7 +188,6 @@ def patchnotes_post(body):
|
|||
'patchID': str(uuid.uuid4()),
|
||||
'title': pn.title,
|
||||
'changes': pn.changes,
|
||||
'version': pn.version,
|
||||
'patch_date': date_str
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue