add context to json

This commit is contained in:
Cayo Puigdefabregas 2023-09-18 16:20:55 +02:00
parent 3f86242bfb
commit 2f250402e3

View file

@ -168,13 +168,15 @@ class DidView(View):
def get_result(self):
components = []
data = {
'@context': ['https://ereuse.org/dpp0.json'],
'document': {},
'dpp': self.id_dpp,
'algorithm': "sha3_256",
'components': components,
}
result = {'data': data}
result = {
'@context': ['https://ereuse.org/dpp0.json'],
'data': data,
}
if self.dpp:
data['document'] = self.dpp.snapshot.json_hw