forked from jsnbuchanan/crowd-funder-for-time-pwa
Stub adding js-yaml ... needs testing and more work
This commit is contained in:
@@ -137,7 +137,7 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h2 class="font-bold text-2xl mt-8">Claim</h2>
|
<h2 class="font-bold text-2xl mt-8">Claim</h2>
|
||||||
<pre>{{ util.inspect(veriClaim, false, null) }}</pre>
|
<pre>{{ yamlVeriClaim }}</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2 class="font-bold text-2xl mt-8">Full Claim</h2>
|
<h2 class="font-bold text-2xl mt-8">Full Claim</h2>
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<pre>{{ util.inspect(fullClaim, false, null) }}</pre>
|
<pre>{{ yamlFullClaim }}</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a :href="apiServer + '/api/claim/' + veriClaim.id" target="_blank">
|
<a :href="apiServer + '/api/claim/' + veriClaim.id" target="_blank">
|
||||||
@@ -186,6 +186,7 @@ import * as serverUtil from "@/libs/endorserServer";
|
|||||||
import QuickNav from "@/components/QuickNav.vue";
|
import QuickNav from "@/components/QuickNav.vue";
|
||||||
import EntityIcon from "@/components/EntityIcon.vue";
|
import EntityIcon from "@/components/EntityIcon.vue";
|
||||||
import { Account } from "@/db/tables/accounts";
|
import { Account } from "@/db/tables/accounts";
|
||||||
|
import * as yaml from 'js-yaml';
|
||||||
|
|
||||||
interface Notification {
|
interface Notification {
|
||||||
group: string;
|
group: string;
|
||||||
@@ -300,7 +301,8 @@ export default class ClaimView extends Vue {
|
|||||||
try {
|
try {
|
||||||
const resp = await this.axios.get(url, { headers });
|
const resp = await this.axios.get(url, { headers });
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
this.veriClaim = resp.data;
|
this.veriClaim = resp.json;
|
||||||
|
this.yamlVeriClaim = yaml.dumps(resp.json);
|
||||||
} else {
|
} else {
|
||||||
// actually, axios typically throws an error so we never get here
|
// actually, axios typically throws an error so we never get here
|
||||||
console.log("Error getting claim:", resp);
|
console.log("Error getting claim:", resp);
|
||||||
@@ -379,7 +381,8 @@ export default class ClaimView extends Vue {
|
|||||||
try {
|
try {
|
||||||
const resp = await this.axios.get(url, { headers });
|
const resp = await this.axios.get(url, { headers });
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
this.fullClaim = resp.data;
|
this.fullClaim = resp.json;
|
||||||
|
this.yamlFullClaim = yaml.dump(resp.json);
|
||||||
} else {
|
} else {
|
||||||
// actually, axios typically throws an error so we never get here
|
// actually, axios typically throws an error so we never get here
|
||||||
console.log("Error getting full claim:", resp);
|
console.log("Error getting full claim:", resp);
|
||||||
|
|||||||
Reference in New Issue
Block a user