router.js
665 Bytes
/**
* 文章router
* @author: leo <qi.li@yoho.cn>
* @date: 23/06/2017
*/
const express = require('express');
const router = express.Router(); // eslint-disable-line
const auth = require('../../doraemon/middleware/auth');
const article = require('./controllers/article');
router.post('/like', article.like);
router.get('/list', article.list);
router.get('/listNoImg', article.listNoImg);
router.get('/listNoUser', article.listNoUser);
router.post('/publish', auth, article.publish);
router.get('/querySingle', article.querySingle);
router.get('/queryByCodeName', article.queryByCodeName);
router.get('/queryById', article.queryById);
module.exports = router;