diff --git a/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageComments.vue b/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageComments.vue index 67075eb218f..364478b88d0 100644 --- a/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageComments.vue +++ b/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageComments.vue @@ -34,7 +34,7 @@ - {{ comment.user.username }} • {{ $d(Date.parse(comment.createdAt), "medium") }} + {{ comment.user.fullName }} • {{ $d(Date.parse(comment.createdAt), "medium") }} diff --git a/mealie/schema/recipe/recipe_comments.py b/mealie/schema/recipe/recipe_comments.py index c0288343794..433440f7a80 100644 --- a/mealie/schema/recipe/recipe_comments.py +++ b/mealie/schema/recipe/recipe_comments.py @@ -14,6 +14,7 @@ class UserBase(MealieModel): id: UUID4 username: str | None = None + full_name: str | None = None admin: bool model_config = ConfigDict(from_attributes=True) diff --git a/tests/integration_tests/user_recipe_tests/test_recipe_comments.py b/tests/integration_tests/user_recipe_tests/test_recipe_comments.py index ce9b1b7d646..8528cfaeff5 100644 --- a/tests/integration_tests/user_recipe_tests/test_recipe_comments.py +++ b/tests/integration_tests/user_recipe_tests/test_recipe_comments.py @@ -54,6 +54,7 @@ def test_create_comment(api_client: TestClient, unique_recipe: Recipe, unique_us assert response_data[0]["recipeId"] == str(unique_recipe.id) assert response_data[0]["text"] == create_data["text"] assert response_data[0]["userId"] == str(unique_user.user_id) + assert len(response_data[0]["user"]["fullName"]) > 0 def test_update_comment(api_client: TestClient, unique_recipe: Recipe, unique_user: TestUser):
{{ comment.user.username }} • {{ $d(Date.parse(comment.createdAt), "medium") }}
{{ comment.user.fullName }} • {{ $d(Date.parse(comment.createdAt), "medium") }}