update Thread class to allow closing
This commit is contained in:
parent
ef7ddd5ec2
commit
e92bb1c616
@ -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("/")
|
||||
|
Loading…
Reference in New Issue
Block a user