Skip to content

Commit acf0c70

Browse files
authored
Renamed several fields (#59)
* Renamed totalTime to cookingTime as that one doesn't exist * Renamed number of services. * Fixed instructions attribute name * Renamed url as uri, as it's wrong
1 parent 876e056 commit acf0c70

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

components/RecipeDetail.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<img class="icons" src="~assets/icons/clock.svg" />
3333
</div>
3434
Cooking time :
35-
<strong> {{recipe.totalTime }} min</strong>
35+
<strong> {{recipe.cookingTime }} min</strong>
3636
</div>
3737
</div>
3838

@@ -42,7 +42,7 @@
4242
<img class="icons" src="~assets/icons/serves.svg" />
4343
</div>
4444
Serves :
45-
<strong>{{recipe.numberOfServices}} persons </strong>
45+
<strong>{{recipe.numberOfservings}} persons </strong>
4646
</div>
4747
<div class="column has-text-centered">
4848
<div>
@@ -78,7 +78,7 @@
7878

7979
<div class="content method">
8080
<h3 class="title has-text-centered"> Method </h3>
81-
<div v-html="recipe.instructions.value" />
81+
<div v-html="recipe.instructions" />
8282
</div>
8383

8484
</div>

lib/api.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export function findAllPromotedRecipes(limit = 4) {
3838
fields: {
3939
recipes: 'title,difficulty,image',
4040
images: 'name,thumbnail',
41-
files: 'filename,url',
41+
files: 'filename,uri',
4242
},
4343
sort: '-created',
4444
};
@@ -64,7 +64,7 @@ export function findAllLatestRecipes(limit = 4, offset = 0) {
6464
fields: {
6565
recipes: 'title,difficulty,image',
6666
images: 'name,thumbnail',
67-
files: 'filename,url',
67+
files: 'filename,uri',
6868
},
6969
};
7070
return jsonApi.get('recipes', query);
@@ -89,7 +89,7 @@ export function findHomePromotedArticlesAndRecipes(limit) {
8989
fields: {
9090
recipes: 'contentType,title,difficulty,image',
9191
images: 'name,thumbnail',
92-
files: 'filename,url',
92+
files: 'filename,uri',
9393
contentTypes: 'type',
9494
},
9595
sort: '-created',
@@ -112,7 +112,7 @@ export function findHomePromotedArticlesAndRecipes(limit) {
112112
fields: {
113113
recipes: 'title,difficulty,image',
114114
images: 'name,thumbnail',
115-
files: 'filename,url',
115+
files: 'filename,uri',
116116
contentTypes: 'type',
117117
},
118118
sort: '-created',
@@ -146,7 +146,7 @@ export function findAllRecipesByCategoryName(
146146
fields: {
147147
recipes: 'title,difficulty,image',
148148
images: 'name,thumbnail',
149-
files: 'filename,url',
149+
files: 'filename,uri',
150150
},
151151
page: {
152152
offset: 0,
@@ -173,7 +173,7 @@ export function findAllRecipesByDifficultyName(
173173
fields: {
174174
recipes: 'title,difficulty,image',
175175
images: 'name,thumbnail',
176-
files: 'filename,url',
176+
files: 'filename,uri',
177177
},
178178
page: {
179179
offset: 0,
@@ -194,7 +194,7 @@ export function findAllRecipesByMaxTotalTime(
194194
filter: {
195195
totalTime: {
196196
condition: {
197-
path: 'totalTime',
197+
path: 'cookingTime',
198198
value: maxTotalTime,
199199
operator: '<',
200200
},
@@ -203,7 +203,7 @@ export function findAllRecipesByMaxTotalTime(
203203
fields: {
204204
recipes: 'title,difficulty,image',
205205
images: 'name,thumbnail',
206-
files: 'filename,url',
206+
files: 'filename,uri',
207207
},
208208
page: {
209209
offset: 0,

0 commit comments

Comments
 (0)