Showing
8 changed files
with
58 additions
and
3 deletions
.babelrc
0 → 100644
.editorconfig
0 → 100644
.eslintignore
0 → 100644
.eslintrc
0 → 100644
.stylelintignore
0 → 100644
.stylelintrc
0 → 100644
@@ -3,7 +3,6 @@ | @@ -3,7 +3,6 @@ | ||
3 | * @author: leo | 3 | * @author: leo |
4 | * @date: 23/06/2017 | 4 | * @date: 23/06/2017 |
5 | */ | 5 | */ |
6 | -const redis = require('redis'); | ||
7 | const redisCli = global.yoho.utils.redisCli; | 6 | const redisCli = global.yoho.utils.redisCli; |
8 | 7 | ||
9 | function getAll(req, res) { | 8 | function getAll(req, res) { |
@@ -13,7 +12,7 @@ function getAll(req, res) { | @@ -13,7 +12,7 @@ function getAll(req, res) { | ||
13 | data: { | 12 | data: { |
14 | total: +reply | 13 | total: +reply |
15 | } | 14 | } |
16 | - }) | 15 | + }); |
17 | }); | 16 | }); |
18 | } | 17 | } |
19 | 18 |
@@ -4,11 +4,12 @@ | @@ -4,11 +4,12 @@ | ||
4 | * @date: 23/06/2017 | 4 | * @date: 23/06/2017 |
5 | */ | 5 | */ |
6 | const express = require('express'); | 6 | const express = require('express'); |
7 | -const router = express.Router(); | 7 | +const router = express.Router(); // eslint-disable-line |
8 | const vote = require('./controllers/vote'); | 8 | const vote = require('./controllers/vote'); |
9 | 9 | ||
10 | router.get('/', vote.getAll); | 10 | router.get('/', vote.getAll); |
11 | router.post('/', vote.addOne); | 11 | router.post('/', vote.addOne); |
12 | + | ||
12 | // router.get('/:vote_id', vote.getOne); | 13 | // router.get('/:vote_id', vote.getOne); |
13 | // router.put('/:vote_id', vote.putOne); | 14 | // router.put('/:vote_id', vote.putOne); |
14 | // router.delete('/:vote_id', vote.deleteOne); | 15 | // router.delete('/:vote_id', vote.deleteOne); |
-
Please register or login to post a comment