feat: use message-id header to only process message once

This commit is contained in:
Leon
2025-07-16 18:38:06 +02:00
parent d47e975574
commit 9512601124
8 changed files with 120 additions and 14 deletions

View File

@@ -5,17 +5,21 @@ from pydantic import BaseModel, ConfigDict
class EntryBase(BaseModel):
"""Base schema for an entry."""
subject: str
body: str
message_id: str
class EntryCreate(EntryBase):
"""Schema for creating a new entry."""
pass
class Entry(EntryBase):
"""Schema for retrieving an entry with its ID and newsletter ID."""
id: int
newsletter_id: int
received_at: datetime.datetime