Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -21,7 +21,7 @@ app.post('/board/:bid/thread', async(req, res) => { | ... | @@ -21,7 +21,7 @@ app.post('/board/:bid/thread', async(req, res) => { |
21 | if(!board) { | 21 | if(!board) { |
22 | res.status(404).json({error: 'Board not found'}); | 22 | res.status(404).json({error: 'Board not found'}); |
23 | } | 23 | } |
24 | - let thread = await db.get('thread').insert({board: board._id, title: req.body.title, content: req.body.content, lastUpdated: Date.now()}); | 24 | + let thread = await db.get('thread').insert({board: board._id, title: req.body.title, content: req.body.content, lastUpdated: Date.now(), count: 1}); |
25 | res.json({thread}); | 25 | res.json({thread}); |
26 | }); | 26 | }); |
27 | app.get('/borad/:bid/thread/:tid', async(req, res) => { | 27 | app.get('/borad/:bid/thread/:tid', async(req, res) => { | ... | ... |
-
Please register or login to post a comment