diff --git a/k8s/deployment-dev.yaml b/k8s/deployment-dev.yaml index a48ffbc..8592fb1 100644 --- a/k8s/deployment-dev.yaml +++ b/k8s/deployment-dev.yaml @@ -246,11 +246,18 @@ spec: service: name: wallet-backend port: - number: 80 + name: http + - path: /swagger + pathType: Prefix + backend: + service: + name: wallet-backend + port: + name: http - path: / pathType: Prefix backend: service: name: wallet-frontend port: - number: 80 + name: http \ No newline at end of file diff --git a/k8s/deployment-prod.yaml b/k8s/deployment-prod.yaml index f031252..f83e662 100644 --- a/k8s/deployment-prod.yaml +++ b/k8s/deployment-prod.yaml @@ -242,11 +242,18 @@ spec: service: name: wallet-backend port: - number: 80 + name: http + - path: /swagger + pathType: Prefix + backend: + service: + name: wallet-backend + port: + name: http - path: / pathType: Prefix backend: service: name: wallet-frontend port: - number: 80 \ No newline at end of file + name: http \ No newline at end of file diff --git a/src/main/kotlin/id/walt/service/SSIKit2WalletService.kt b/src/main/kotlin/id/walt/service/SSIKit2WalletService.kt index 40821d6..1b1efca 100644 --- a/src/main/kotlin/id/walt/service/SSIKit2WalletService.kt +++ b/src/main/kotlin/id/walt/service/SSIKit2WalletService.kt @@ -320,7 +320,8 @@ class SSIKit2WalletService(accountId: UUID) : WalletService(accountId) { val credentialId = Json.parseToJsonElement( Base64.UrlSafe.decode(credential.split(".")[1]).decodeToString() - ).jsonObject["vc"]!!.jsonObject["id"]?.jsonPrimitive?.content ?: randomUUID() + ).jsonObject["vc"]!!.jsonObject["id"]?.jsonPrimitive?.content?.takeIf { it.isNotBlank() } + ?: randomUUID() CredentialsService.add(accountId, DbCredential(credentialId = credentialId, document = credential)) println(">>> $index. CREDENTIAL stored with Id: $credentialId") diff --git a/web/src/pages/credentials/[credentialId].vue b/web/src/pages/credentials/[credentialId].vue index 2676031..70c2841 100644 --- a/web/src/pages/credentials/[credentialId].vue +++ b/web/src/pages/credentials/[credentialId].vue @@ -32,12 +32,12 @@ ) }} -
+
- {{ jwtJson.vc.issuer.name }} + {{ jwtJson.vc.issuer?.name }}
@@ -249,30 +249,32 @@
-
Issuer
-
-
Name
-
{{ jwtJson.vc.issuer.name }}
-
-
-
DID
-
- {{ jwtJson.vc.issuer.id ? jwtJson.vc.issuer.id : jwtJson.vc.issuer }} +
+
Issuer
+
+
Name
+
{{ jwtJson.vc.issuer.name }}
-
-
-
-
- {{ - jwtJson.vc.expirationDate && jwtJson.vc.issuanceDate - ? "Valid from " + new Date(jwtJson.vc.issuanceDate).toISOString().slice(0, 10) + " to " + new - Date(jwtJson.vc.expirationDate).toISOString().slice(0, 10) - : "" - }} +
+
DID
+
+ {{ jwtJson.vc.issuer.id ? jwtJson.vc.issuer.id : jwtJson.vc.issuer }} +
-
- Issued - {{jwtJson.vc.issuanceDate ? new Date(jwtJson.vc.issuanceDate).toISOString().slice(0, 10) : "No issuancedate" }} +
+
+
+ {{ + jwtJson.vc.expirationDate && jwtJson.vc.issuanceDate + ? "Valid from " + new Date(jwtJson.vc.issuanceDate).toISOString().slice(0, 10) + " to " + new + Date(jwtJson.vc.expirationDate).toISOString().slice(0, 10) + : "" + }} +
+
+ Issued + {{ jwtJson.vc.issuanceDate ? new Date(jwtJson.vc.issuanceDate).toISOString().slice(0, 10) : "No issuancedate" }} +
diff --git a/web/src/pages/index.vue b/web/src/pages/index.vue index 2de0edd..eb2cd14 100644 --- a/web/src/pages/index.vue +++ b/web/src/pages/index.vue @@ -57,13 +57,13 @@ ) }} -
+
- {{ credential.issuer.name }} + {{ credential.issuer?.name }}