diff --git a/src/api/getRecipeInfos.ts b/src/api/getRecipeInfos.ts index 7e6a6a5..309922e 100644 --- a/src/api/getRecipeInfos.ts +++ b/src/api/getRecipeInfos.ts @@ -35,6 +35,9 @@ const getRecipeInfos = async ({ id, updated: rawUpdated, title, + preparationTime, + cookingTime, + totalTime, ownerId, owner, isPublic, @@ -45,6 +48,9 @@ const getRecipeInfos = async ({ id, updated: new Date(rawUpdated), title, + preparationTime, + cookingTime, + totalTime, ownerId, owner, isPublic, diff --git a/src/api/types/FullRecipeView.ts b/src/api/types/FullRecipeView.ts index 0c051e9..0e3388a 100644 --- a/src/api/types/FullRecipeView.ts +++ b/src/api/types/FullRecipeView.ts @@ -7,6 +7,9 @@ export interface RawFullRecipeView { modified: string | null slug: string title: string + preparationTime: number + cookingTime: number + totalTime: number text: string owner: UserInfoView starCount: number @@ -21,6 +24,9 @@ interface FullRecipeView { modified: Date | null slug: string title: string + preparationTime: number + cookingTime: number + totalTime: number text: string owner: UserInfoView starCount: number @@ -35,18 +41,24 @@ export const toFullRecipeView = ({ modified: rawModified, slug, title, + preparationTime, + cookingTime, + totalTime, text, owner, starCount, viewerCount, mainImage: rawMainImage, isPublic -}: RawFullRecipeView) => ({ +}: RawFullRecipeView): FullRecipeView => ({ id, created: new Date(rawCreated), modified: rawModified ? new Date(rawModified) : null, slug, title, + preparationTime, + cookingTime, + totalTime, text, owner, starCount, diff --git a/src/api/types/RecipeInfoView.ts b/src/api/types/RecipeInfoView.ts index ed7ea8b..79a6308 100644 --- a/src/api/types/RecipeInfoView.ts +++ b/src/api/types/RecipeInfoView.ts @@ -5,6 +5,9 @@ export interface RawRecipeInfoView { id: number updated: string title: string + preparationTime: number + cookingTime: number + totalTime: number ownerId: number owner: UserInfoView isPublic: boolean @@ -17,6 +20,9 @@ interface RecipeInfoView { id: number updated: Date title: string + preparationTime: number + cookingTime: number + totalTime: number owner: UserInfoView isPublic: boolean starCount: number