From 9b141b63349b9a1267d5d497b8b7d9921c337025 Mon Sep 17 00:00:00 2001 From: Matthew Aaron Raymer Date: Sat, 9 Dec 2023 18:24:44 +0800 Subject: [PATCH] Stub adding js-yaml ... needs testing and more work --- src/views/ClaimView.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/views/ClaimView.vue b/src/views/ClaimView.vue index 34b43108..756e9e16 100644 --- a/src/views/ClaimView.vue +++ b/src/views/ClaimView.vue @@ -137,7 +137,7 @@

Claim

-
{{ util.inspect(veriClaim, false, null) }}
+
{{ yamlVeriClaim }}

Full Claim

@@ -158,7 +158,7 @@
-
{{ util.inspect(fullClaim, false, null) }}
+
{{ yamlFullClaim }}
@@ -186,6 +186,7 @@ import * as serverUtil from "@/libs/endorserServer"; import QuickNav from "@/components/QuickNav.vue"; import EntityIcon from "@/components/EntityIcon.vue"; import { Account } from "@/db/tables/accounts"; +import * as yaml from 'js-yaml'; interface Notification { group: string; @@ -300,7 +301,8 @@ export default class ClaimView extends Vue { try { const resp = await this.axios.get(url, { headers }); if (resp.status === 200) { - this.veriClaim = resp.data; + this.veriClaim = resp.json; + this.yamlVeriClaim = yaml.dumps(resp.json); } else { // actually, axios typically throws an error so we never get here console.log("Error getting claim:", resp); @@ -379,7 +381,8 @@ export default class ClaimView extends Vue { try { const resp = await this.axios.get(url, { headers }); if (resp.status === 200) { - this.fullClaim = resp.data; + this.fullClaim = resp.json; + this.yamlFullClaim = yaml.dump(resp.json); } else { // actually, axios typically throws an error so we never get here console.log("Error getting full claim:", resp);