Modified files
storeapi/database.py
---
+++
@@ -11,6 +11,7 @@
sqlalchemy.Column("id", sqlalchemy.Integer, primary_key=True),
sqlalchemy.Column("body", sqlalchemy.String),
sqlalchemy.Column("user_id", sqlalchemy.ForeignKey("users.id"), nullable=False),
+ sqlalchemy.Column("image_url", sqlalchemy.String)
)
user_table = sqlalchemy.Table(
storeapi/tests/routers/test_post.py
---
+++
@@ -68,6 +68,7 @@
"id": 1,
"body": body,
"user_id": confirmed_user["id"],
+ "image_url": None,
}.items() <= response.json().items()
storeapi/models/post.py
---
+++
@@ -1,3 +1,5 @@
+from typing import Optional
+
from pydantic import BaseModel, ConfigDict
@@ -10,6 +12,7 @@
id: int
user_id: int
+ image_url: Optional[str] = None
class UserPostWithLikes(UserPost):