contentacms/contenta_vue_nuxt

TypeError: Cannot read property 'url' of undefined

erdemalkan opened this issue · 0 comments

In the list pages, the description images come as files. Therefore, I think that "url" in the relevant lines in api.js file should be changed to "uri".

Application fails because "url" cannot be found.

lib/api.js

diff --git a/lib/api.js b/lib/api.js
index 9a3b9a6..034a62b 100644
--- a/lib/api.js
+++ b/lib/api.js
@@ -38,7 +38,7 @@ export function findAllPromotedRecipes(limit = 4) {
fields: {
recipes: 'title,difficulty,image',
images: 'name,thumbnail',

  •  files: 'filename,url',
    
  •  files: 'filename,uri',
    
    },
    sort: '-created',
    };
    @@ -64,7 +64,7 @@ export function findAllLatestRecipes(limit = 4, offset = 0) {
    fields: {
    recipes: 'title,difficulty,image',
    images: 'name,thumbnail',
  •  files: 'filename,url',
    
  •  files: 'filename,uri',
    
    },
    };
    return jsonApi.get('recipes', query);
    @@ -89,7 +89,7 @@ export function findHomePromotedArticlesAndRecipes(limit) {
    fields: {
    recipes: 'contentType,title,difficulty,image',
    images: 'name,thumbnail',
  •  files: 'filename,url',
    
  •  files: 'filename,uri',
     contentTypes: 'type',
    
    },
    sort: '-created',
    @@ -112,7 +112,7 @@ export function findHomePromotedArticlesAndRecipes(limit) {
    fields: {
    recipes: 'title,difficulty,image',
    images: 'name,thumbnail',
  •  files: 'filename,url',
    
  •  files: 'filename,uri',
     contentTypes: 'type',
    
    },
    sort: '-created',
    @@ -146,7 +146,7 @@ export function findAllRecipesByCategoryName(
    fields: {
    recipes: 'title,difficulty,image',
    images: 'name,thumbnail',
  •  files: 'filename,url',
    
  •  files: 'filename,uri',
    
    },
    page: {
    offset: 0,
    @@ -173,7 +173,7 @@ export function findAllRecipesByDifficultyName(
    fields: {
    recipes: 'title,difficulty,image',
    images: 'name,thumbnail',
  •  files: 'filename,url',
    
  •  files: 'filename,uri',
    
    },
    page: {
    offset: 0,
    @@ -203,7 +203,7 @@ export function findAllRecipesByMaxTotalTime(
    fields: {
    recipes: 'title,difficulty,image',
    images: 'name,thumbnail',
  •  files: 'filename,url',
    
  •  files: 'filename,uri',
    
    },
    page: {
    offset: 0,