Linted code

This commit is contained in:
Dan Zajdband
2016-11-03 12:06:36 +01:00
parent 692eedc25a
commit e8045be5e2
3 changed files with 25 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
const express = require('express');
const router = express.Router();
const defaultComment = {
body: 'This is a comment!',
name: 'John Doe',
createdAt: Date.now()
};
router.get('/', (req, res) => {
const status = req.query.type || 'pending';
res.json([Object.assign({}, defaultComment, {status})]);
});
module.exports = router;