mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 22:24:23 +01:00
Updates response code when appointment is valid but rejected
This commit is contained in:
@@ -31,12 +31,13 @@ def add_appointment():
|
|||||||
|
|
||||||
if type(appointment) == Appointment:
|
if type(appointment) == Appointment:
|
||||||
appointment_added = watcher.add_appointment(appointment, debug, logging)
|
appointment_added = watcher.add_appointment(appointment, debug, logging)
|
||||||
rcode = HTTP_OK
|
|
||||||
|
|
||||||
# ToDo: #13-create-server-side-signature-receipt
|
# ToDo: #13-create-server-side-signature-receipt
|
||||||
if appointment_added:
|
if appointment_added:
|
||||||
|
rcode = HTTP_OK
|
||||||
response = "appointment accepted. locator: {}".format(appointment.locator)
|
response = "appointment accepted. locator: {}".format(appointment.locator)
|
||||||
else:
|
else:
|
||||||
|
rcode = HTTP_SERVICE_UNAVAILABLE
|
||||||
response = "appointment rejected"
|
response = "appointment rejected"
|
||||||
|
|
||||||
elif type(appointment) == tuple:
|
elif type(appointment) == tuple:
|
||||||
|
|||||||
Reference in New Issue
Block a user