Update assets/vue/components/social/SocialWallPost.vue

Co-authored-by: Angel Fernando Quiroz Campos <angelfqc.18@gmail.com>
pull/4962/head
christianbeeznest 1 year ago committed by GitHub
parent 510193d5ae
commit af099b8ba4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      assets/vue/components/social/SocialWallPost.vue

@ -122,14 +122,12 @@ const computedAttachments = computed(() => {
async function loadAttachments() {
try {
let idUrl = props.post["@id"];
let parts = idUrl.split('/');
let socialPostId = parts[parts.length - 1];
const postIri = props.post["@id"]
const response = await axios.get(`${ENTRYPOINT}social_posts/${socialPostId}/attachments`);
attachments.value = response.data;
const response = await axios.get(`${postIri}/attachments`)
attachments.value = response.data
} catch (error) {
console.error("There was an error loading the attachments!", error);
console.error("There was an error loading the attachments!", error)
}
}

Loading…
Cancel
Save