We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
AllCoffeeDonations
1 parent 6b8bc12 commit 6a4617aCopy full SHA for 6a4617a
2 files changed
app/donations/__init__.py
@@ -71,4 +71,4 @@ async def get_donations(db: Session = Depends(get_db)):
71
all_donations = db.query(Donation).order_by(Donation.created_at).all()
72
for donation in all_donations:
73
response.append(parse_donation_json(donation))
74
- return response
+ return {"all_donations": response}
database/schemas.py
@@ -16,6 +16,7 @@ class CoffeeDonation(BaseModel):
16
message: Optional[str] = Field(None, example="Great tutorials but this is a test message.")
17
link: str = Field(None, example="https://buymeacoffee.com/hackersslackers/c/fake")
18
coffee_id: int = Field(None, example=3453543)
19
+ created_at: datetime = Field(None, example="2019-11-07 14:38:35")
20
# fmt: on
21
22
0 commit comments