From e92bb1c6163bf107a0af42d787a2f2b64dfdf3ab Mon Sep 17 00:00:00 2001 From: agatha Date: Sun, 31 Mar 2024 23:09:22 -0400 Subject: [PATCH] update Thread class to allow closing --- backend/forum.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/forum.py b/backend/forum.py index 603f37c..e5b39a1 100644 --- a/backend/forum.py +++ b/backend/forum.py @@ -23,13 +23,16 @@ class PostCreate(BaseModel): class Thread: id: int title: str + closed: bool - def __init__(self, id, title): + def __init__(self, id, title, closed=False): self.id = id self.title = title + self.closed = closed POSTS = [] +THREADS = [] @app.get("/")