From fdb4d90ab4b112ab66939bb27dfb0b581ae5ead5 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 11 Jul 2023 16:39:04 +0200 Subject: [PATCH] add chid of components --- ereuse_devicehub/modules/did/views.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ereuse_devicehub/modules/did/views.py b/ereuse_devicehub/modules/did/views.py index b88685a8..0d1f5844 100644 --- a/ereuse_devicehub/modules/did/views.py +++ b/ereuse_devicehub/modules/did/views.py @@ -158,10 +158,12 @@ class DidView(View): return before_dpp def get_result(self): + components = [] data = { 'document': {}, 'dpp': self.id_dpp, 'algorithm': "sha3_256", + 'components': components, } result = {'data': data} @@ -174,6 +176,9 @@ class DidView(View): did=last_dpp.key, host=app.config.get('HOST') ) data['url_last'] = url_last + + for c in self.dpp.snapshot.components: + components.append({c.type: c.chid}) return result dpps = []