Added preparation, cooking, and total times to recipe views.
This commit is contained in:
parent
b8787cd8f9
commit
af0b91a6f2
@ -35,6 +35,9 @@ const getRecipeInfos = async ({
|
|||||||
id,
|
id,
|
||||||
updated: rawUpdated,
|
updated: rawUpdated,
|
||||||
title,
|
title,
|
||||||
|
preparationTime,
|
||||||
|
cookingTime,
|
||||||
|
totalTime,
|
||||||
ownerId,
|
ownerId,
|
||||||
owner,
|
owner,
|
||||||
isPublic,
|
isPublic,
|
||||||
@ -45,6 +48,9 @@ const getRecipeInfos = async ({
|
|||||||
id,
|
id,
|
||||||
updated: new Date(rawUpdated),
|
updated: new Date(rawUpdated),
|
||||||
title,
|
title,
|
||||||
|
preparationTime,
|
||||||
|
cookingTime,
|
||||||
|
totalTime,
|
||||||
ownerId,
|
ownerId,
|
||||||
owner,
|
owner,
|
||||||
isPublic,
|
isPublic,
|
||||||
|
@ -7,6 +7,9 @@ export interface RawFullRecipeView {
|
|||||||
modified: string | null
|
modified: string | null
|
||||||
slug: string
|
slug: string
|
||||||
title: string
|
title: string
|
||||||
|
preparationTime: number
|
||||||
|
cookingTime: number
|
||||||
|
totalTime: number
|
||||||
text: string
|
text: string
|
||||||
owner: UserInfoView
|
owner: UserInfoView
|
||||||
starCount: number
|
starCount: number
|
||||||
@ -21,6 +24,9 @@ interface FullRecipeView {
|
|||||||
modified: Date | null
|
modified: Date | null
|
||||||
slug: string
|
slug: string
|
||||||
title: string
|
title: string
|
||||||
|
preparationTime: number
|
||||||
|
cookingTime: number
|
||||||
|
totalTime: number
|
||||||
text: string
|
text: string
|
||||||
owner: UserInfoView
|
owner: UserInfoView
|
||||||
starCount: number
|
starCount: number
|
||||||
@ -35,18 +41,24 @@ export const toFullRecipeView = ({
|
|||||||
modified: rawModified,
|
modified: rawModified,
|
||||||
slug,
|
slug,
|
||||||
title,
|
title,
|
||||||
|
preparationTime,
|
||||||
|
cookingTime,
|
||||||
|
totalTime,
|
||||||
text,
|
text,
|
||||||
owner,
|
owner,
|
||||||
starCount,
|
starCount,
|
||||||
viewerCount,
|
viewerCount,
|
||||||
mainImage: rawMainImage,
|
mainImage: rawMainImage,
|
||||||
isPublic
|
isPublic
|
||||||
}: RawFullRecipeView) => ({
|
}: RawFullRecipeView): FullRecipeView => ({
|
||||||
id,
|
id,
|
||||||
created: new Date(rawCreated),
|
created: new Date(rawCreated),
|
||||||
modified: rawModified ? new Date(rawModified) : null,
|
modified: rawModified ? new Date(rawModified) : null,
|
||||||
slug,
|
slug,
|
||||||
title,
|
title,
|
||||||
|
preparationTime,
|
||||||
|
cookingTime,
|
||||||
|
totalTime,
|
||||||
text,
|
text,
|
||||||
owner,
|
owner,
|
||||||
starCount,
|
starCount,
|
||||||
|
@ -5,6 +5,9 @@ export interface RawRecipeInfoView {
|
|||||||
id: number
|
id: number
|
||||||
updated: string
|
updated: string
|
||||||
title: string
|
title: string
|
||||||
|
preparationTime: number
|
||||||
|
cookingTime: number
|
||||||
|
totalTime: number
|
||||||
ownerId: number
|
ownerId: number
|
||||||
owner: UserInfoView
|
owner: UserInfoView
|
||||||
isPublic: boolean
|
isPublic: boolean
|
||||||
@ -17,6 +20,9 @@ interface RecipeInfoView {
|
|||||||
id: number
|
id: number
|
||||||
updated: Date
|
updated: Date
|
||||||
title: string
|
title: string
|
||||||
|
preparationTime: number
|
||||||
|
cookingTime: number
|
||||||
|
totalTime: number
|
||||||
owner: UserInfoView
|
owner: UserInfoView
|
||||||
isPublic: boolean
|
isPublic: boolean
|
||||||
starCount: number
|
starCount: number
|
||||||
|
Loading…
Reference in New Issue
Block a user