diff --git a/src/api/getRecipeInfos.ts b/src/api/getRecipeInfos.ts
index 72ded0f..7e6a6a5 100644
--- a/src/api/getRecipeInfos.ts
+++ b/src/api/getRecipeInfos.ts
@@ -36,7 +36,7 @@ const getRecipeInfos = async ({
updated: rawUpdated,
title,
ownerId,
- ownerUsername,
+ owner,
isPublic,
starCount,
mainImage: rawMainImage,
@@ -46,7 +46,7 @@ const getRecipeInfos = async ({
updated: new Date(rawUpdated),
title,
ownerId,
- ownerUsername,
+ owner,
isPublic,
starCount,
mainImage: toImageView(rawMainImage),
diff --git a/src/api/types/FullRecipeView.ts b/src/api/types/FullRecipeView.ts
index cda9c2a..0c051e9 100644
--- a/src/api/types/FullRecipeView.ts
+++ b/src/api/types/FullRecipeView.ts
@@ -1,4 +1,5 @@
import ImageView, { RawImageView, toImageView } from './ImageView'
+import UserInfoView from './UserInfoView'
export interface RawFullRecipeView {
id: number
@@ -7,8 +8,7 @@ export interface RawFullRecipeView {
slug: string
title: string
text: string
- ownerId: number
- ownerUsername: string
+ owner: UserInfoView
starCount: number
viewerCount: number
mainImage: RawImageView
@@ -22,8 +22,7 @@ interface FullRecipeView {
slug: string
title: string
text: string
- ownerId: number
- ownerUsername: string
+ owner: UserInfoView
starCount: number
viewerCount: number
mainImage: ImageView
@@ -37,8 +36,7 @@ export const toFullRecipeView = ({
slug,
title,
text,
- ownerId,
- ownerUsername,
+ owner,
starCount,
viewerCount,
mainImage: rawMainImage,
@@ -50,8 +48,7 @@ export const toFullRecipeView = ({
slug,
title,
text,
- ownerId,
- ownerUsername,
+ owner,
starCount,
viewerCount,
mainImage: toImageView(rawMainImage),
diff --git a/src/api/types/RecipeInfoView.ts b/src/api/types/RecipeInfoView.ts
index 4a2964b..ed7ea8b 100644
--- a/src/api/types/RecipeInfoView.ts
+++ b/src/api/types/RecipeInfoView.ts
@@ -1,11 +1,12 @@
import ImageView, { RawImageView } from './ImageView'
+import UserInfoView from './UserInfoView'
export interface RawRecipeInfoView {
id: number
updated: string
title: string
ownerId: number
- ownerUsername: string
+ owner: UserInfoView
isPublic: boolean
starCount: number
mainImage: RawImageView
@@ -16,8 +17,7 @@ interface RecipeInfoView {
id: number
updated: Date
title: string
- ownerId: number
- ownerUsername: string
+ owner: UserInfoView
isPublic: boolean
starCount: number
mainImage: ImageView
diff --git a/src/pages/recipe/Recipe.tsx b/src/pages/recipe/Recipe.tsx
index c3c38f6..6419995 100644
--- a/src/pages/recipe/Recipe.tsx
+++ b/src/pages/recipe/Recipe.tsx
@@ -19,7 +19,7 @@ const Recipe = ({ recipe, imgUrl }: RecipeProps) => {