update Thread class to allow closing

This commit is contained in:
agatha 2024-03-31 23:09:22 -04:00
parent ef7ddd5ec2
commit e92bb1c616

View File

@ -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("/")