Toggle navigation
Toggle navigation
This project
Loading...
Sign in
201side
/
floater
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
3
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
robin*
2020-12-09 20:36:56 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
9fe47033f574d7bd6a07967cf5567f4554c1217b
9fe47033
2 parents
5daa2ff1
96e04a12
Builds for 1 pipeline
failed
in 0 seconds
Merge remote-tracking branch 'origin/master'
Changes
1
Builds
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
14 deletions
src/routes/board.js
src/routes/board.js
View file @
9fe4703
...
...
@@ -13,20 +13,6 @@ app.get('/board/:bid', async(req, res) => {
res
.
render
(
'threadslist'
,
{
board
,
threads
});
});
/*
app.post('/board/:bid/thread', async(req, res) => {
if(!req.body.title || !req.body.content) { //
res.status(400).json({error: 'Invalid input'});
}
let board = await db.get('board').findOne({name: req.params.bid});
if(!board) {
res.status(404).json({error: 'Board not found'});
}
let thread = await db.get('thread').insert({board: board._id, title: req.body.title, content: req.body.content, lastUpdated: Date.now(), count: 1});
res.json({thread});
});
*/
app
.
post
(
'/board/:bid'
,
async
(
req
,
res
)
=>
{
if
(
!
req
.
body
.
title
||
!
req
.
body
.
content
)
{
res
.
status
(
400
).
send
(
'제목이나 내용을 써주세요.'
);
...
...
Please
register
or
login
to post a comment