Fix enums

This commit is contained in:
Yarmo Mackenbach 2021-10-16 08:00:51 +02:00
parent acd1dab2f4
commit e4bbadf710
No known key found for this signature in database
GPG key ID: 37367F4AF4087AD1

View file

@ -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
}