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,
|
||||
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,
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user