Added signatures to appointment

This commit is contained in:
Salvatore Ingala
2019-10-10 16:38:34 +07:00
parent b74df42a2b
commit 99db9a29ad
5 changed files with 21 additions and 5 deletions

View File

@@ -30,12 +30,12 @@ def add_appointment():
appointment = inspector.inspect(request_data)
if type(appointment) == Appointment:
appointment_added = watcher.add_appointment(appointment)
appointment_added, signature = watcher.add_appointment(appointment)
# ToDo: #13-create-server-side-signature-receipt
if appointment_added:
rcode = HTTP_OK
response = "appointment accepted. locator: {}".format(appointment.locator)
response = "appointment accepted. locator: {}. signature: {}".format(appointment.locator, signature)
else:
rcode = HTTP_SERVICE_UNAVAILABLE
response = "appointment rejected"