update Thread class to allow closing
This commit is contained in:
parent
ef7ddd5ec2
commit
e92bb1c616
@ -23,13 +23,16 @@ class PostCreate(BaseModel):
|
|||||||
class Thread:
|
class Thread:
|
||||||
id: int
|
id: int
|
||||||
title: str
|
title: str
|
||||||
|
closed: bool
|
||||||
|
|
||||||
def __init__(self, id, title):
|
def __init__(self, id, title, closed=False):
|
||||||
self.id = id
|
self.id = id
|
||||||
self.title = title
|
self.title = title
|
||||||
|
self.closed = closed
|
||||||
|
|
||||||
|
|
||||||
POSTS = []
|
POSTS = []
|
||||||
|
THREADS = []
|
||||||
|
|
||||||
|
|
||||||
@app.get("/")
|
@app.get("/")
|
||||||
|
Loading…
Reference in New Issue
Block a user