Browse Source

fix fetching errors

pull/129/head
Phillip 2 years ago
parent
commit
e64ed9be4d
  1. 3
      qortal-ui-plugins/plugins/core/components/ChatGifs/ChatGifs.js
  2. 2
      qortal-ui-plugins/plugins/core/components/ImageComponent.js

3
qortal-ui-plugins/plugins/core/components/ChatGifs/ChatGifs.js

@ -186,7 +186,7 @@ setOpenGifModal: { attribute: false }
if (metaData.files) { if (metaData.files) {
const metaDataArray = metaData.files.map((data) => { const metaDataArray = metaData.files.map((data) => {
return { return {
url: `${nodeUrl}/arbitrary/GIF_REPOSITORY/${this.myAccountName}/${collection.identifier}?filepath=${data}`, url: `${nodeUrl}/arbitrary/GIF_REPOSITORY/${this.myAccountName}/${collection.identifier}?filepath=${data}&apiKey=${this.getApiKey()}`,
filePath: data, filePath: data,
identifier: collection.identifier, identifier: collection.identifier,
name: this.myAccountName name: this.myAccountName
@ -612,6 +612,7 @@ setOpenGifModal: { attribute: false }
@click=${() => { @click=${() => {
if (this.isLoading) return; if (this.isLoading) return;
this.mode = 'explore'; this.mode = 'explore';
this.currentCollection = null;
}} }}
icon="vaadin:search" icon="vaadin:search"
slot="icon"> slot="icon">

2
qortal-ui-plugins/plugins/core/components/ImageComponent.js

@ -67,7 +67,7 @@ async _fetchImage() {
}, 1000) }, 1000)
}); });
try { try {
const response = await fetch(this.gif.url + `&apiKey=${this.getApiKey()}`); const response = await fetch(this.gif.url);
const data = await response.json(); const data = await response.json();
console.log({data}); console.log({data});
if (data.ok) { if (data.ok) {

Loading…
Cancel
Save