From e4bbadf7105b740dc9371e29cf6a01fdb506342b Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Sat, 16 Oct 2021 08:00:51 +0200 Subject: [PATCH] Fix enums --- api/v0/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/v0/index.js b/api/v0/index.js index 621b81c..b0babf8 100644 --- a/api/v0/index.js +++ b/api/v0/index.js @@ -206,6 +206,12 @@ const sanitize = (data) => { if (!claim.verification) { claim.verification = {} } + // TODO Fix upstream + claim.matches.forEach(match => { + match.proof.request.access = ['generic', 'nocors', 'granted', 'server'][match.proof.request.access] + match.claim.format = ['uri', 'fingerprint', 'message'][match.claim.format] + match.claim.relation = ['contains', 'equals', 'oneof'][match.claim.relation] + }) data.keyData.users[iUser].claims[iClaim] = claim }