robin*

스레드 목록 추가

......@@ -9,8 +9,8 @@ app.get('/board/:bid', async(req, res) => {
if(!board) {
res.status(404).json({error: 'Board not found'});
}
let threads = await db.get('thread').find({board: board._id}, {sort: '-lastUpdated', limit: 20});
res.json({threads: threads})
let threads = await db.get('thread').find({board: board._id}, {sort: '-lastUpdated', limit: 50});
res.render('threadslist', {board, threads});
});
app.post('/board/:bid/thread', async(req, res) => {
......
<h1>
{{board.title}}
<small class="text-muted">
{{board.name}}
</small>
</h1>
<table class="table">
{{#each threads}}
<tr>
<td>
{{this.title}}
({{this.count}})
</td>
</tr>
{{/each}}
</table>
\ No newline at end of file