mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
style fix, put return up top
This commit is contained in:
parent
9c77cb959e
commit
fe05db1595
1 changed files with 5 additions and 5 deletions
|
|
@ -167,6 +167,11 @@ function handleRequest(req, res) {
|
|||
}
|
||||
|
||||
function commentServer(context) {
|
||||
return { get: getComments
|
||||
, count: countComments
|
||||
, post: postComment
|
||||
}
|
||||
|
||||
function addComment(post, name, email, url, body, timestamp) {
|
||||
var comments = context.db.get(post) || []
|
||||
comments.push({ id: comments.length + 1
|
||||
|
|
@ -250,11 +255,6 @@ function commentServer(context) {
|
|||
comments = context.db.get(post) || []
|
||||
res.respond({count: comments.length})
|
||||
}
|
||||
|
||||
return { get: getComments
|
||||
, count: countComments
|
||||
, post: postComment
|
||||
}
|
||||
}
|
||||
|
||||
function requestHandler(context) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue