|
|
/**
|
|
|
* index.js
|
|
|
* @author: leo
|
|
|
* 文章router
|
|
|
* @author: leo <qi.li@yoho.cn>
|
|
|
* @date: 23/06/2017
|
|
|
*/
|
|
|
const express = require('express');
|
|
|
const router = express.Router(); // eslint-disable-line
|
|
|
const vote = require('./controllers/vote');
|
|
|
const article = require('./controllers/article');
|
|
|
|
|
|
router.get('/', vote.getAll);
|
|
|
router.post('/', vote.addOne);
|
|
|
|
|
|
// router.get('/:vote_id', vote.getOne);
|
|
|
// router.put('/:vote_id', vote.putOne);
|
|
|
// router.delete('/:vote_id', vote.deleteOne);
|
|
|
router.get('/all', article.all);
|
|
|
|
|
|
module.exports = router; |
...
|
...
|
|