Updates Watcher to use serialize instead of to_json

This commit is contained in:
Sergi Delgado Segura
2019-11-07 13:33:29 +00:00
parent 30159399f0
commit e6e577c99e

View File

@@ -38,7 +38,7 @@ class Watcher:
self.signing_key = load_pem_private_key(secret_key_pem, password=None, backend=default_backend())
def sign_appointment(self, appointment):
data = appointment.to_json().encode("utf-8")
data = appointment.serialize()
return self.signing_key.sign(data, ec.ECDSA(hashes.SHA256()))
def add_appointment(self, appointment):